mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 15:29:37 +08:00
加入帐号密码缓存
This commit is contained in:
parent
03dceb3292
commit
94a010f938
@ -92,12 +92,30 @@ Page({
|
||||
} else {
|
||||
newDate.setDate(newDate.getDate() + 14)
|
||||
}
|
||||
|
||||
wx.getStorage({
|
||||
key: 'DEP_USERNAME',
|
||||
success(res) {
|
||||
_this.setData({
|
||||
username: res.data
|
||||
})
|
||||
},
|
||||
})
|
||||
wx.getStorage({
|
||||
key: 'DEP_PWD',
|
||||
success(res) {
|
||||
_this.setData({
|
||||
pwd: res.data
|
||||
})
|
||||
},
|
||||
})
|
||||
_this.setData({
|
||||
userDetail,
|
||||
maxDate: newDate.getTime()
|
||||
maxDate: newDate.getTime(),
|
||||
})
|
||||
// 展示模块
|
||||
_this.visibleBlock()
|
||||
|
||||
},
|
||||
// 跳转会议预约页面
|
||||
goRes(e) {
|
||||
@ -176,7 +194,7 @@ Page({
|
||||
})
|
||||
}
|
||||
_this.setData({
|
||||
menuList
|
||||
menuList
|
||||
})
|
||||
},
|
||||
|
||||
@ -225,6 +243,12 @@ Page({
|
||||
message: '认证失败!',
|
||||
top: 50
|
||||
})
|
||||
wx.removeStorage({
|
||||
key: 'DEP_USERNAME',
|
||||
})
|
||||
wx.removeStorage({
|
||||
key: 'DEP_PWD',
|
||||
})
|
||||
} else {
|
||||
// 认证通过
|
||||
Notify({
|
||||
@ -232,10 +256,18 @@ Page({
|
||||
message: '认证通过!',
|
||||
top: 50
|
||||
})
|
||||
wx.setStorage({
|
||||
key: "DEP_USERNAME",
|
||||
data: uName
|
||||
})
|
||||
wx.setStorage({
|
||||
key: "DEP_PWD",
|
||||
data: pwd
|
||||
})
|
||||
_this.setData({
|
||||
['menuList[0].visible']: true,
|
||||
username: '',
|
||||
pwd: '',
|
||||
username: uName,
|
||||
pwd: pwd,
|
||||
showLogin: false,
|
||||
depName: res.data.orgName,
|
||||
depId: res.data.orgId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user