From f00c1cca98455a036548672d28e7e8ad13729a21 Mon Sep 17 00:00:00 2001
From: litian <C21AF165>
Date: 星期四, 11 四月 2024 21:57:27 +0800
Subject: [PATCH] 问题修改

---
 pages/bindInfo/index.js |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/pages/bindInfo/index.js b/pages/bindInfo/index.js
index 322d512..1fcccf6 100644
--- a/pages/bindInfo/index.js
+++ b/pages/bindInfo/index.js
@@ -1,5 +1,7 @@
 // pages/index/bindInfo/index.js
-import { setSessionGuid } from "../../assets/js/userAction"
+import {
+  setSessionGuid
+} from "../../assets/js/userAction"
 const app = getApp();
 Page({
 
@@ -74,6 +76,7 @@
   },
   // 鑾峰彇鐧诲綍鐢ㄦ埛韬唤
   getUserInfo() {
+    let that = this;
     app.MG.identity.getCurrentAppUser().then(res => {
       // 鐢ㄦ埛淇℃伅浼樺厛绾э細鏁欏笀璁よ瘉 > 寰俊 > 瀛︾敓锛堟敞鍐屾椂榛樿锛�
       if (res) {
@@ -93,9 +96,15 @@
         }
         wx.setStorageSync(app.config.userInfoKey, JSON.stringify(defaultUser));
       }
-      wx.navigateTo({
-        url: this.data.redirectPage ? this.data.redirectPage : '/pages/home/home'
-      })
+      if (that.data.redirectPage == "" || that.data.redirectPage == "/pages/home/home" || that.data.redirectPage == "/pages/bookServices/assort/index" || that.data.redirectPage == "/pages/study/index" || that.data.redirectPage == "/pages/cart/index" || that.data.redirectPage == "/pages/personalCenter/index") {
+        wx.switchTab({
+          url: that.data.redirectPage != "" ? that.data.redirectPage : '/pages/home/home'
+        })
+      } else {
+        wx.navigateTo({
+          url: that.data.redirectPage
+        })
+      }
     });
   },
 

--
Gitblit v1.9.1