From 908ce43ff21c2068ef5148b0a417423c8ed9eae5 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 12 三月 2025 16:37:32 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
---
h5/App.vue | 99 +++++++++++++++++++++++--------------------------
1 files changed, 46 insertions(+), 53 deletions(-)
diff --git a/h5/App.vue b/h5/App.vue
index a46a53b..18a1815 100644
--- a/h5/App.vue
+++ b/h5/App.vue
@@ -1,52 +1,22 @@
<script>
-import { wxAuthorize, refreshToken } from '@/api'
+import { wxAuthorize, refreshToken, app_url } from '@/api'
export default {
onLaunch: function () {
- var that = this
- if (!that.$store.state.openid) {
- let url = window.location.href
- let code = ''
- let source = ''
- if (url.indexOf('code=') !== -1) {
- const query = url.split('?')
- console.log('app-app', url)
- for (const q of query) {
- if (q.indexOf('code=') !== -1) {
- code = q.substring(q.indexOf('code=') + 5, q.length)
- }
- if (q.indexOf('source=') !== -1) {
- source = q.substring(q.indexOf('source=') + 7,q.indexOf('source=') + 8 )
- }
- }
- wxAuthorize({
- code: code,
- source
- }).then(res => {
- console.log('app_ress', res)
- if (res.code === 200) {
- that.$store.commit('setOpenId', res.data.openid)
- if (res.data.member) {
- that.$store.commit('setMember', res.data.member)
- }
- }
- })
- } else {
- // const appID = 'wx4d7c10bdec51942b'
- // let uri = encodeURIComponent(url)
- // let authURL =
- // `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
- // window.location.href = authURL
- }
- }
- // 鍒锋柊token
- const token = uni.getStorageSync('token')
- // if (token) {
- // refreshToken().then(res => {
- // if(res.code && res.code === 200){
- // this.$store.commit('setToken', res.data)
- // }
- // })
- // }
+ window.addEventListener("popstate", (event) => {
+ const path = this.$route.fullPath
+ // console.log('path', path);
+ if(path == '/pages/login/login' || path == '/'){
+ window.location.href = app_url
+ }
+ if(path == '/pages/wdata/home'){
+ window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
+ }
+ if(path == '/pages/waybill/home'){
+ window.location.href = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/waybill/home'
+ }
+ })
+ uni.setStorageSync('transportList', [])
+ console.log('onLaunch')
},
onShow: function () {
console.log('App Show')
@@ -60,7 +30,11 @@
<style lang="scss">
/*姣忎釜椤甸潰鍏叡css */
@import "uview-ui/index.scss";
-
+html, body {
+ height: auto;
+ min-height: 100%;
+ overflow: visible;
+}
.flex-cb {
display: flex;
justify-content: space-between;
@@ -73,7 +47,18 @@
max-width: 800rpx;
overflow-y: auto;
}
-
+.empty_wrap{
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ color: #666666;
+ min-height: 600rpx;
+ image{
+ width: 300rpx;
+ height: 300rpx;
+ }
+}
.doumee-container .ivu-tabs-nav {
width: 100%;
}
@@ -166,8 +151,14 @@
}
.placeholder9 {
- color: #999999;
+ color: #999999 !important;
font-size: 28rpx;
+}
+.placeholder3{
+ color: #333333 !important;
+}
+.red{
+ color: red !important;
}
//璁剧疆鍦嗚
@@ -221,13 +212,13 @@
}
.main_app {
- padding: 0 30rpx 30rpx;
+ padding: 10rpx 30rpx 0rpx;
font-size: 28rpx;
color: #333333;
}
.popupShow {
- overflow: hidden;
- position: fixed;
+ overflow: hidden;
+ position: fixed;
width: 100%;
}
.placeholder6 {
@@ -241,7 +232,6 @@
width: 64rpx;
height: 64rpx;
border-radius: 50%;
- overflow: hidden;
margin-right: 20rpx;
display: flex;
justify-content: center;
@@ -270,6 +260,9 @@
.ml12 {
margin-left: 12rpx;
}
+.ml6 {
+ margin-left: 6rpx;
+}
.mt6 {
margin-top: 6rpx;
}
--
Gitblit v1.9.3