From f4f2891ac617aca6e2a5f1dc8f86ba3f054e3392 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 01 八月 2024 08:52:35 +0800
Subject: [PATCH] aa

---
 wechat_jiaxuan/app.js |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/wechat_jiaxuan/app.js b/wechat_jiaxuan/app.js
index 4bb2f46..10dab9b 100644
--- a/wechat_jiaxuan/app.js
+++ b/wechat_jiaxuan/app.js
@@ -10,7 +10,7 @@
 App({
   globalData,
   onLaunch: function (op) {
-    console.log('options', op.query.scene)
+    console.log('options', op.query)
     let pathMap = [
       '/pages/detailDis/product',
       '/pages/detailDis/case',
@@ -27,10 +27,16 @@
     wx.login({
       timeout: 5000,
       success: (res) => {
+        var userId = null
+        if (op.query.scene) {
+          let temp = op.query.scene.split('_')
+          userId = temp[2] 
+        }
         if (res.code) {
           //鍙戣捣缃戠粶璇锋眰
           wxLoginCustomer({
-            code: res.code
+            code: res.code,
+            userId 
           }).then(res => {
             wx.setStorageSync('token', res.data.token)
             this.globalData.token = res.data.token
@@ -56,9 +62,7 @@
       fail(err) {
         console.log(err)
       }
-    })
-
-
+    }) 
 
   }
 })

--
Gitblit v1.9.3