From 26fb0b3e76f52212a2cef49a0bc0b94e7425880c Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期一, 29 七月 2024 10:55:10 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia

---
 wechat_jiaxuan/app.js |   27 +++++++++++++++++++++++----
 1 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/wechat_jiaxuan/app.js b/wechat_jiaxuan/app.js
index e56016f..1cc3c46 100644
--- a/wechat_jiaxuan/app.js
+++ b/wechat_jiaxuan/app.js
@@ -1,16 +1,26 @@
-import { wxLoginCustomer } from './api/index'
+import {
+  wxLoginCustomer
+} from './api/index'
 App({
   globalData: {
     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
     }
-    // 
+    // 鎺堟潈鐧诲綍
     wx.login({
       timeout: 5000,
       success(res) {
@@ -25,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('鐧诲綍澶辫触锛�')
             }
@@ -37,5 +53,8 @@
         console.log(err)
       }
     })
+
+
+
   }
 })
\ No newline at end of file

--
Gitblit v1.9.3