This commit is contained in:
yzy committed 2026-01-21 10:45:29 +08:00
1 parent e2b5ae4d00
commit 6a822548b1
1 file changed
+3 -3
+3 -3
View File
@@ -147,7 +147,7 @@
// 更新用户数据中的头像URL // 更新用户数据中的头像URL
userData.value.avatar = uploadRes.data; userData.value.avatar = uploadRes.data;
userStore.updateUserInfo('avatar', uploadRes.data); userStore.updateUserInfo('avatar', uploadRes.data);
getUserInformation();
uni.showToast({ uni.showToast({
title: 'Upload success', title: 'Upload success',
icon: 'success' icon: 'success'
@@ -258,9 +258,9 @@
<view class="profile-header px-4 pt-4 bg-gradient-to-r from-blue-500 to-purple-600"> <view class="profile-header px-4 pt-4 bg-gradient-to-r from-blue-500 to-purple-600">
<view class="flex items-center text-thme"> <view class="flex items-center text-thme">
<view <view
class="w-16 h-16 rounded-full border-2 border-theme border-solid mr-4 p-3 bg-[#ddd] overflow-hidden"> class="w-20 h-20 rounded-full border-2 border-theme border-solid mr-4 bg-[#ddd] overflow-hidden">
<!-- 直接使用原生 image 标签 --> <!-- 直接使用原生 image 标签 -->
<image :src="userData?.avatar || '/static/image/head.png'" class="w-full h-full object-cover" @click="chooseAndUploadAvatar" /> <image :src="userData?.avatarUrl || '/static/image/head.png'" class="w-full h-full object-cover" @click="chooseAndUploadAvatar" />
</view> </view>
<view class="flex flex-col justify-center items-start gap-1"> <view class="flex flex-col justify-center items-start gap-1">