修复bug

This commit is contained in:
2026-06-05 17:50:17 +08:00
parent 5379380d33
commit f5f6885318

View File

@@ -145,6 +145,8 @@
opacity: 0,
extraIcons: [] // 右侧额外图标
},
// 用户信息(响应式)
userInfo: uni.getStorageSync('userInfo') || {}
}
},
@@ -163,9 +165,9 @@
staticHost() {
return this.$config.staticUrl
},
user() {
return uni.getStorageSync('userInfo') || {}
}
user() {
return this.userInfo
}
},
@@ -210,14 +212,17 @@
}).then(obj => {
if(obj.flag){
console.log("更新缓存中用户信息")
uni.setStorageSync('userInfo', {
const newUserInfo = {
userType: obj.data.userType,
oaAuth: obj.data.oaAuth,
cusNo: obj.data.cusNo,
userName: obj.data.userName,
openId: obj.data.openId,
subscribe: obj.data.subscribeMsg
})
}
uni.setStorageSync('userInfo', newUserInfo)
// 更新响应式数据
this.userInfo = newUserInfo
}
});