feat(获取用户信息工具类): 新增对账号的存储
This commit is contained in:
parent
c22deee552
commit
0d55fc76e1
@ -57,11 +57,11 @@ export function usePageInitialization(options = {}) {
|
|||||||
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userInfo = reactive({
|
const userInfo = reactive({
|
||||||
name: 'user',
|
id: '-',
|
||||||
id: '1001',
|
account: '-',
|
||||||
userAvatar: '',
|
|
||||||
userNickname: 'user',
|
userNickname: 'user',
|
||||||
account: '1234567890',
|
name: 'user',
|
||||||
|
userAvatar: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
// 收入信息
|
// 收入信息
|
||||||
@ -214,6 +214,7 @@ export function usePageInitialization(options = {}) {
|
|||||||
if (userProfile) {
|
if (userProfile) {
|
||||||
// 使用缓存数据
|
// 使用缓存数据
|
||||||
userInfo.id = userProfile.account
|
userInfo.id = userProfile.account
|
||||||
|
userInfo.account = userProfile.account
|
||||||
userInfo.userNickname = userProfile.userNickname
|
userInfo.userNickname = userProfile.userNickname
|
||||||
userInfo.userAvatar = userProfile.userAvatar
|
userInfo.userAvatar = userProfile.userAvatar
|
||||||
return
|
return
|
||||||
@ -224,6 +225,7 @@ export function usePageInitialization(options = {}) {
|
|||||||
const res = await getMemberProfile()
|
const res = await getMemberProfile()
|
||||||
if (res.status && res.body) {
|
if (res.status && res.body) {
|
||||||
userInfo.id = res.body.account
|
userInfo.id = res.body.account
|
||||||
|
userInfo.account = res.body.account
|
||||||
userInfo.userNickname = res.body.userNickname
|
userInfo.userNickname = res.body.userNickname
|
||||||
userInfo.userAvatar = res.body.userAvatar
|
userInfo.userAvatar = res.body.userAvatar
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user