合并代码
This commit is contained in:
@@ -156,12 +156,15 @@ export default {
|
||||
// 加载账户信息
|
||||
const loadAccountInfo = async () => {
|
||||
try {
|
||||
console.log(userStore.user,'userStore.user');
|
||||
|
||||
if (userStore.user?.id) {
|
||||
const response = await api.get(`/user/profile`);
|
||||
console.log(response.data);
|
||||
if (response.data.success) {
|
||||
accountInfo.value = response.data.data || { balance: '0.00' };
|
||||
accountInfo.value = response.data.user || { balance: '0.00' };
|
||||
// 确保加载头像
|
||||
if (response.data.data?.avatar) {
|
||||
if (response.data.user?.avatar) {
|
||||
avatarUrl.value = response.data.data.avatar;
|
||||
// 更新store中的头像
|
||||
if(userStore.user) {
|
||||
|
||||
Reference in New Issue
Block a user