|
|
@@ -527,12 +527,10 @@ export const actions = {
|
|
|
commit('option/REQUEST_WECHATINFO_STATUS')
|
|
|
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 (response.data.status >= 0) { // 请求到数据
|
|
|
if (id !== '' && id && id !== undefined) { // 传了openid
|
|
|
Userinfo.openid = id
|
|
|
} else { // 没有openid
|
|
|
@@ -543,6 +541,7 @@ export const actions = {
|
|
|
Userinfo.status = response.data.status
|
|
|
Userinfo.enterprises = response.data.enterprises
|
|
|
localStorage.setItem('USOFTMALLWECHATINFO', JSON.stringify(Userinfo))
|
|
|
+ commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', Userinfo)
|
|
|
} else {
|
|
|
// localStorage.removeItem('USOFTMALLWECHATINFO')
|
|
|
}
|