From a75b18a4157ab486e0b51c438ac165ab3a08e3e0 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 25 七月 2024 18:10:00 +0800
Subject: [PATCH] 代码提交
---
wechat_jiaxuan/app.js | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/wechat_jiaxuan/app.js b/wechat_jiaxuan/app.js
index c9e2dcb..1cc3c46 100644
--- a/wechat_jiaxuan/app.js
+++ b/wechat_jiaxuan/app.js
@@ -6,14 +6,21 @@
primary: '#B08771',
bottomLift: ''
},
- onLaunch: function () {
+ onLaunch: function (op) {
+ console.log('options', op.query.scene)
+ 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;
+ this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom
}
// 鎺堟潈鐧诲綍
- const member = wx.getStorageSync('member')
wx.login({
timeout: 5000,
success(res) {
@@ -28,6 +35,12 @@
wx.setStorageSync('openid', res.data.member.openid)
wx.setStorageSync('sessionKey', res.data.sessionKey)
wx.setStorageSync('token', res.data.token)
+ if (op.query.scene) {
+ let temp = op.query.scene.split('_')
+ wx.navigateTo({
+ url: `${pathMap[temp[1]]}?id=${temp[0]}&userId=${temp[2]}`,
+ })
+ }
} else {
console.log('鐧诲綍澶辫触锛�')
}
@@ -42,5 +55,6 @@
})
+
}
})
\ No newline at end of file
--
Gitblit v1.9.3