From 586b00bf2ea9e11c3dd1d27efa3d2ae67d3c3e53 Mon Sep 17 00:00:00 2001
From: tanghaolin <1723298894@qq.com>
Date: 星期三, 20 十一月 2024 16:05:53 +0800
Subject: [PATCH] 修改登录是不勾选记住密码,导致的刷新token是的异常问题

---
 login/login/index.js       |    2 ++
 utils/api.js               |   10 ++++++----
 workDesktop/index/index.js |    1 -
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/login/login/index.js b/login/login/index.js
index 2539aa2..64ba9e4 100644
--- a/login/login/index.js
+++ b/login/login/index.js
@@ -176,6 +176,8 @@
         userInfo.EmployeeID = return_user.EmployeeID; //浣跨敤鍛樺伐ID
         userInfo.CorpID = return_user.LoginAccount.ID;
         userInfo.RealName = return_user.Name;
+        userInfo.phone = that.data.phone
+        userInfo.password = that.data.password
         that.loginSuccessCb(userInfo);
       }
     });
diff --git a/utils/api.js b/utils/api.js
index 64bb7e7..32b0967 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -106,7 +106,7 @@
 }
 const RefreshToken = () => {
   // 鑾峰彇璐︽埛淇℃伅
-  let accountInfo = wx.getStorageSync("AccountInfo")
+  let accountInfo = wx.getStorageSync("LoginUserInfo")
   // 鑾峰彇鐧诲綍鐨勭敤鎴蜂俊鎭�
   let data = {
     LoginName: accountInfo.phone,
@@ -168,9 +168,11 @@
 
 //瑙e瘑 JWT token 鐨勪俊鎭�
 function decryptJWT(token) {
-
-  token = weappJwt(token)
-  return token
+  let jwt_token = defaultClone(token)
+  return weappJwt(jwt_token)
+}
+function defaultClone (value){
+  return JSON.parse(JSON.stringify(value))
 }
 
 //灏� JWT 鏃堕棿鎴宠浆鎹㈡垚 Date
diff --git a/workDesktop/index/index.js b/workDesktop/index/index.js
index b544310..6d292dd 100644
--- a/workDesktop/index/index.js
+++ b/workDesktop/index/index.js
@@ -56,7 +56,6 @@
       return;
     }
     this.getAssignDialog()
-    
     app.getAllAlarmList()
     this.setData({
       userInfo: app.globalData.userInfo,

--
Gitblit v1.9.3