feat: add avatar modification limit display

This commit is contained in:
2026-04-09 16:48:50 +08:00
parent cc93fb03b0
commit 7552f9946b
3 changed files with 42 additions and 2 deletions

View File

@@ -3,8 +3,23 @@
<view class='container' wx:if="{{members.nickname}}">
<!-- 昵称信息 -->
<view class='list'>
<button class='cell avatar cell-btn' open-type="chooseAvatar" bindchooseavatar="onChooseAvatar">
<text class='title'>头像</text>
<!-- 如果还有修改次数 -->
<button wx:if="{{members.avatarModifyRemainCount > 0}}" class='cell avatar cell-btn' open-type="chooseAvatar" bindchooseavatar="onChooseAvatar">
<view class='title-box'>
<text class='title'>头像</text>
<text class='sub-title'>本年还可修改{{members.avatarModifyRemainCount}}次</text>
</view>
<view class='right-cell'>
<image class='avatar-img' src='{{members.avatar ? members.avatar : "../../images/avatar.png"}}' mode='aspectFill'></image>
<image class='right-arrow' src='../../images/46@3x.png'></image>
</view>
</button>
<!-- 如果没有修改次数了 -->
<button wx:else class='cell avatar cell-btn' bindtap="onAvatarNoCount">
<view class='title-box'>
<text class='title'>头像</text>
<text class='sub-title error-text'>本年修改次数已用完</text>
</view>
<view class='right-cell'>
<image class='avatar-img' src='{{members.avatar ? members.avatar : "../../images/avatar.png"}}' mode='aspectFill'></image>
<image class='right-arrow' src='../../images/46@3x.png'></image>