From 00bf17838b496e6fcfed2e521f9c27f8f0e3e3c7 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 05 八月 2024 18:38:20 +0800
Subject: [PATCH] ‘’
---
wechat_jiaxuan/app.js | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/wechat_jiaxuan/app.js b/wechat_jiaxuan/app.js
index d52c340..9503c79 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,12 +88,13 @@
}
})
} else {
- if (op.query.scene) {
- let temp = op.query.scene.split('_')
- wx.navigateTo({
- url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`,
- })
- }
+ this.globalData.token = token
+ // if (op.query.scene) {
+ // let temp = op.query.scene.split('_')
+ // wx.navigateTo({
+ // url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`,
+ // })
+ // }
}
})
} else {
@@ -134,9 +138,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