hookehuyr

fix: 修复我的页面头像显示问题

- 修正头像字段路径:avatar_url → avatar?.src
- 使用强制刷新 fetchUserInfo(true) 跳过防抖
- 确保从头像设置页面返回时能立即看到最新头像

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
......@@ -12,7 +12,7 @@
>
<!-- Avatar -->
<view class="w-[160rpx] h-[160rpx] rounded-full overflow-hidden border-2 border-white shadow-sm shrink-0">
<img class="w-full h-full object-cover" :src="userInfo?.avatar_url || defaultAvatar" />
<img class="w-full h-full object-cover" :src="userInfo?.avatar?.src || defaultAvatar" />
</view>
<!-- Info -->
......@@ -101,8 +101,9 @@ useLoad(() => {
* @description 带防抖机制(5秒内不重复请求)
*/
useDidShow(() => {
// userStore.fetchUserInfo() 内部有防抖逻辑,不会频繁请求
userStore.fetchUserInfo()
// 从头像设置等页面返回时,强制刷新以显示最新数据
// 使用 force=true 跳过防抖检查
userStore.fetchUserInfo(true)
})
const menuItems = [
......