Commit 407b6aa3 by 高淑倩

登录更新plus缓存 removeStorageSync

parent 302aa86e
...@@ -41,7 +41,7 @@ wxService.page({ ...@@ -41,7 +41,7 @@ wxService.page({
}, () => { }, () => {
// 当前用户是否关注公众号 // 当前用户是否关注公众号
this.getMemberSubscribe() this.getMemberSubscribe()
this.loginUpdateStroage() //登录更新plus缓存 this.loginUpdateStroage() // 登录更新plus缓存
}) })
// 动态设置title // 动态设置title
...@@ -50,6 +50,7 @@ wxService.page({ ...@@ -50,6 +50,7 @@ wxService.page({
}) })
}, },
loginUpdateStroage() { loginUpdateStroage() {
wx.removeStorageSync('_baseUserInfo')
const code = wx.getStorageSync('_loginCode') const code = wx.getStorageSync('_loginCode')
const wechatInfo = wx.getStorageSync('_wechatInfo') const wechatInfo = wx.getStorageSync('_wechatInfo')
wxService.login().then((res) => { wxService.login().then((res) => {
...@@ -57,6 +58,10 @@ wxService.page({ ...@@ -57,6 +58,10 @@ wxService.page({
code:res.code, code:res.code,
wechatInfo, wechatInfo,
brandId: app.globalData.brandId, brandId: app.globalData.brandId,
}).then(response => {
let dataResp = response.data.data
wx.setStorageSync('token', dataResp.token)
wx.setStorageSync('_baseUserInfo', dataResp)
}) })
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment