|
|
@@ -528,12 +528,17 @@ export const actions = {
|
|
|
return axios.get('/wx/getWxUserInfo', { params: params })
|
|
|
.then(response => {
|
|
|
commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', response.data)
|
|
|
+ let Userinfo = localStorage.getItem('USOFTMALLWECHATINFO')
|
|
|
+ Userinfo = Userinfo && JSON.parse(Userinfo) || {}
|
|
|
+ localStorage.removeItem('USOFTMALLWECHATINFO')
|
|
|
if (response.data.status >= 0) {
|
|
|
// 有状态
|
|
|
if (id !== '' && id && id !== undefined) {
|
|
|
- response.data.openid = id
|
|
|
+ Userinfo.openid = id
|
|
|
}
|
|
|
- localStorage.setItem('USOFTMALLWECHATINFO', JSON.stringify(response.data))
|
|
|
+ Userinfo.status = response.data.status
|
|
|
+ Userinfo.enterprises = response.data.enterprises
|
|
|
+ localStorage.setItem('USOFTMALLWECHATINFO', Userinfo)
|
|
|
} else {
|
|
|
// localStorage.removeItem('USOFTMALLWECHATINFO')
|
|
|
}
|