From d715d486163a7398226fd361ddd65b0055351242 Mon Sep 17 00:00:00 2001
From: jt <jt@activesoft.com>
Date: 星期三, 15 二月 2023 10:19:43 +0800
Subject: [PATCH] 记住密码后退出重新登录没有获取上次登录的账号密码问题

---
 pages/login/index.vue |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/pages/login/index.vue b/pages/login/index.vue
index dea3ef1..7e7d72a 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -281,12 +281,19 @@
 				this.$data.login="loading......";
 				//鐧诲綍
 				this.$store.dispatch('login',loginInfo).then(success=>{
-					// console.log(success);
+					console.log(success);
 					if (success.code == '00000') {
+						//鐧诲綍鎴愬姛鍚庢竻绌虹紦瀛樻暟鎹�+						this.$store.commit("areaFunc",null);
+						this.$store.commit("classAttrList",null);
+						this.$store.commit("classGridStyleInfo",null);
+						this.$store.commit("dicValueInfo",null);
+						this.$store.commit("subClassAttrList",null);
+						this.$store.commit("subClassGridStyleInfo",null);
 						//璁剧疆鍏ㄥ眬鍙傛暟锛歶ser-鐢ㄦ埛淇℃伅
 						uni.setStorageSync('server',loginInfo.server);
-						// uni.setStorageSync('account',loginInfo.uname);
-						// uni.setStorageSync('password',loginInfo.pwd);
+						uni.setStorageSync('account',loginInfo.uname);
+						uni.setStorageSync('password',loginInfo.pwd);
 						// this.mutatLogin({loginid:success});
 						this.$store.commit('login',{
 							loginid:success 
@@ -298,12 +305,13 @@
 						// 	url:'../index/index?args=9999999999'
 						// });
 						this.login="寮�鐧诲綍";
+						
 					}else{
 						uni.showModal({title:"閿欒",content:success.msg,showCancel:false,confirmText:"鍙栨秷"});
 						this.login="寮�鐧诲綍";
 					}
 				}).catch(ex=>{
-					// console.log(ex);
+					console.log(ex);
 					uni.showModal({title:"閿欒",content:ex.errMsg,showCancel:false,confirmText:"鍙栨秷"});
 					this.login="寮�鐧诲綍";
 				});

--
Gitblit v1.9.1