Files
sundynix-pets/pets-fe/components/pet-switch/pet-switch.wxml
T
Blizzard 11c4d490e6 feat(fe): 宠物照片替代默认头像,身份卡移到首页门面卡
- 首页/我的/切换条:上传过照片就用照片,没有才退回 emoji
- 报告页分享海报:先异步加载头像再开画,画成圆形头像
- 一起生活的天数改成从到家日期算,没填就显示「-」并可点去补
- 身份卡入口从「我的」页移到首页门面卡右上角

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 17:08:32 +08:00

14 lines
653 B
Plaintext

<scroll-view class="pet-switch" scroll-x="true" enhanced="{{true}}" show-scrollbar="{{false}}">
<view wx:for="{{pets}}" wx:key="id"
class="pet-chip {{item.id === currentId ? 'active' : ''}}"
data-id="{{item.id}}" bindtap="onPick">
<view class="mini-avatar">
<image wx:if="{{item.avatar_url}}" class="mini-avatar-img" src="{{item.avatar_url}}" mode="aspectFill"></image>
<block wx:else>{{item.emoji}}</block>
</view>{{item.name}}
</view>
<view wx:if="{{showAdd}}" class="pet-chip" bindtap="onAdd">
<view class="mini-avatar"><pt-icon name="plus" size="{{30}}"></pt-icon></view>添加
</view>
</scroll-view>