From 2c08a98f7e85ec7c9376f27a7933e75e44d672f7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 27 八月 2024 15:52:59 +0800
Subject: [PATCH] ll
---
wechat_jiaxuan/app.js | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/wechat_jiaxuan/app.js b/wechat_jiaxuan/app.js
index d52c340..0d84e2d 100644
--- a/wechat_jiaxuan/app.js
+++ b/wechat_jiaxuan/app.js
@@ -4,26 +4,29 @@
} from './api/index'
import CustomHook from 'spa-custom-hooks';
let globalData = {
+ // token: wx.getStorageSync('token'),
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) {
this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom
}
+ },
+ onShow(op) {
// 鎺堟潈鐧诲綍
var userId = null
if (op.query.scene) {
@@ -85,6 +88,8 @@
}
})
} else {
+ this.globalData.token = token
+ wx.setStorageSync('member', res.data)
if (op.query.scene) {
let temp = op.query.scene.split('_')
wx.navigateTo({
@@ -134,9 +139,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({
--
Gitblit v1.9.3