From 3508c76f824c6632b47aff17b1ec2f2a11c504fc Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 01 八月 2024 14:31:12 +0800
Subject: [PATCH] lll
---
wechat_staff/pages/login/index.wxml | 2
wechat_staff/static/icon/logo.png | 0
wechat_staff/pages/sets/index.js | 2
wechat_jiaxuan/app.js | 38 +++++++++++-------
wechat_jiaxuan/pages/index/index.js | 25 +++++++-----
5 files changed, 39 insertions(+), 28 deletions(-)
diff --git a/wechat_jiaxuan/app.js b/wechat_jiaxuan/app.js
index d52c340..55d4c10 100644
--- a/wechat_jiaxuan/app.js
+++ b/wechat_jiaxuan/app.js
@@ -4,21 +4,21 @@
} from './api/index'
import CustomHook from 'spa-custom-hooks';
let globalData = {
- token: '',
+ token: wx.getStorageSync('token'),
primary: '#B08771',
bottomLift: ''
}
+let pathMap = [
+ '/pages/detailDis/product',
+ '/pages/detailDis/case',
+ '/pages/detailDis/realpic',
+ '/pages/consult/detail',
+ '/pages/productVideo/index',
+]
App({
globalData,
onLaunch: function (op) {
console.log('options', op.query)
- let pathMap = [
- '/pages/detailDis/product',
- '/pages/detailDis/case',
- '/pages/detailDis/realpic',
- '/pages/consult/detail',
- '/pages/productVideo/index',
- ]
//鑾峰彇褰撳墠璁惧淇℃伅
const WindowInfo = wx.getWindowInfo()
if (WindowInfo.safeArea.top > 20) {
@@ -85,12 +85,12 @@
}
})
} else {
- if (op.query.scene) {
- let temp = op.query.scene.split('_')
- wx.navigateTo({
- url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`,
- })
- }
+ // if (op.query.scene) {
+ // let temp = op.query.scene.split('_')
+ // wx.navigateTo({
+ // url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`,
+ // })
+ // }
}
})
} else {
@@ -136,7 +136,15 @@
}
},
onShow(options) {
- console.log('options', options);
+ const token = wx.getStorageSync('token') || ''
+ if(token){
+ if (options.query.scene) {
+ let temp = options.query.scene.split('_')
+ wx.navigateTo({
+ url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`,
+ })
+ }
+ }
}
})
CustomHook.install({
diff --git a/wechat_jiaxuan/pages/index/index.js b/wechat_jiaxuan/pages/index/index.js
index 6031fc8..097386a 100644
--- a/wechat_jiaxuan/pages/index/index.js
+++ b/wechat_jiaxuan/pages/index/index.js
@@ -52,14 +52,9 @@
this.initData()
},
onShow() {
- let that = this
- setTimeout(() => {
- getMemberInfo().then(res => {
- this.setData({
- member: res.data
- })
- })
- }, 500)
+ const member = wx.getStorageSync('member')
+ this.setData({ member })
+
eventBus.once("reloadHome", () => {
console.log('reloadHome');
this.onLoad()
@@ -72,6 +67,7 @@
},
changePath(e) {
let index = e.currentTarget.dataset.type
+ const member = this.data.member
let that = this
switch (index) {
case '0':
@@ -92,9 +88,16 @@
})
break;
case '2':
- wx.navigateTo({
- url: '/pages/design/design'
- })
+ if(member && member.phone){
+ wx.navigateTo({
+ url: '/pages/design/design'
+ })
+ }else{
+ wx.navigateTo({
+ url: '/pages/auth/auth',
+ })
+ }
+
// wx.navigateTo({
// url: '/pages/wonderful_activity/index',
// success: function(res) {
diff --git a/wechat_staff/pages/login/index.wxml b/wechat_staff/pages/login/index.wxml
index db321a5..67069e8 100644
--- a/wechat_staff/pages/login/index.wxml
+++ b/wechat_staff/pages/login/index.wxml
@@ -1,5 +1,5 @@
<view class="container">
- <image class="avatar" src=""></image>
+ <image class="avatar" src="../../static/icon/logo.png"></image>
<view class="home_title">蹇楅偊浼樺</view>
<view class="placeholder9">鏈�鎳備綘鐨勮惀閿�鍔╂墜</view>
<!-- -->
diff --git a/wechat_staff/pages/sets/index.js b/wechat_staff/pages/sets/index.js
index 5775c82..0f40aeb 100644
--- a/wechat_staff/pages/sets/index.js
+++ b/wechat_staff/pages/sets/index.js
@@ -29,7 +29,7 @@
wx.clearStorageSync()
setTimeout(() => {
wx.setStorageSync('sessionKey', sessionKey)
- wx.navigateTo({
+ wx.redirectTo({
url: '/pages/login/index',
})
}, 300)
diff --git a/wechat_staff/static/icon/logo.png b/wechat_staff/static/icon/logo.png
new file mode 100644
index 0000000..9a470c8
--- /dev/null
+++ b/wechat_staff/static/icon/logo.png
Binary files differ
--
Gitblit v1.9.3