feat(获取用户信息工具类): 新增对账号的存储

This commit is contained in:
hzj 2025-11-28 16:19:44 +08:00
parent c22deee552
commit 0d55fc76e1

View File

@ -57,11 +57,11 @@ export function usePageInitialization(options = {}) {
// 用户信息
const userInfo = reactive({
name: 'user',
id: '1001',
userAvatar: '',
id: '-',
account: '-',
userNickname: 'user',
account: '1234567890',
name: 'user',
userAvatar: '',
})
// 收入信息
@ -214,6 +214,7 @@ export function usePageInitialization(options = {}) {
if (userProfile) {
// 使用缓存数据
userInfo.id = userProfile.account
userInfo.account = userProfile.account
userInfo.userNickname = userProfile.userNickname
userInfo.userAvatar = userProfile.userAvatar
return
@ -224,6 +225,7 @@ export function usePageInitialization(options = {}) {
const res = await getMemberProfile()
if (res.status && res.body) {
userInfo.id = res.body.account
userInfo.account = res.body.account
userInfo.userNickname = res.body.userNickname
userInfo.userAvatar = res.body.userAvatar
}