修复Salon对象存储头像展示

This commit is contained in:
2026-11-01 00:41:51 +08:00
parent e52e04685d
commit f30abbc26c
29 changed files with 229 additions and 28 deletions
+4
View File
@@ -90,6 +90,10 @@ Page({
wx.navigateTo({ url: event.currentTarget.dataset.url })
},
onProfileAvatarError() {
this.setData({ 'profileCard.avatar': '' })
},
async loadProfile() {
try {
const profile = await profileCache.getProfile()
+1 -1
View File
@@ -2,7 +2,7 @@
<view class="card profile-card">
<view class="profile-main">
<view class="account-avatar">
<image wx:if="{{profileCard.avatar}}" src="{{profileCard.avatar}}" mode="aspectFill"></image>
<image wx:if="{{profileCard.avatar}}" src="{{profileCard.avatar}}" mode="aspectFill" binderror="onProfileAvatarError"></image>
<text wx:else>{{profileCard.avatarText}}</text>
</view>
<view class="profile-copy">