|
@@ -67,10 +67,21 @@ Component({
|
|
|
title: res.msg,
|
|
|
icon: "none"
|
|
|
})
|
|
|
- wx.setStorageSync('loginMsg', {
|
|
|
+ let loginMsg = {
|
|
|
accountno: this.data.accountno,
|
|
|
+ baseUrl: getApp().globalData.http.baseUrl,
|
|
|
password: (this.data.memory) ? this.data.password : ''
|
|
|
- })
|
|
|
+ }
|
|
|
+ let list = wx.getStorageSync('logins') || [],
|
|
|
+ index = list.findIndex(v => v.accountno == loginMsg.accountno && v.baseUrl == loginMsg.baseUrl);
|
|
|
+
|
|
|
+ if (index != -1) {
|
|
|
+ list[index] = loginMsg
|
|
|
+ } else {
|
|
|
+ list.push(loginMsg)
|
|
|
+ }
|
|
|
+ wx.setStorageSync('logins', list)
|
|
|
+ wx.setStorageSync('loginMsg', loginMsg)
|
|
|
require("./login").loginMsg(res);
|
|
|
getApp().globalData.remindchangepassword = res.remindchangepassword == 1;
|
|
|
})
|