11c4d490e6
- 首页/我的/切换条:上传过照片就用照片,没有才退回 emoji - 报告页分享海报:先异步加载头像再开画,画成圆形头像 - 一起生活的天数改成从到家日期算,没填就显示「-」并可点去补 - 身份卡入口从「我的」页移到首页门面卡右上角 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
57 lines
2.8 KiB
Plaintext
57 lines
2.8 KiB
Plaintext
<nav-bar title="我的"></nav-bar>
|
||
|
||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||
<view class="page-body tab-nofab">
|
||
<!-- 和「宠友主页」同一个组件。自己看到的就是别人看到的,装扮才有意义 -->
|
||
<profile-head card="{{card}}" bind:relations="goRelations"
|
||
bind:decorate="goDecorate" bind:pet="onPickPet"></profile-head>
|
||
|
||
<view class="btn btn-ghost btn-block me-preview" bindtap="previewPublic">
|
||
<pt-icon name="user" size="{{30}}"></pt-icon>看看别人眼里的我
|
||
</view>
|
||
|
||
<!-- 我的毛孩子 -->
|
||
<view class="card">
|
||
<view class="section-head">
|
||
<view class="sh-title">我的毛孩子</view>
|
||
<view class="link" bindtap="onAddPet">+ 添加</view>
|
||
</view>
|
||
<view wx:for="{{pets}}" wx:key="id" class="pet-row" data-id="{{item.id}}" bindtap="onPickPet">
|
||
<view class="pet-emoji">
|
||
<image wx:if="{{item.avatar_url}}" class="pet-emoji-img" src="{{item.avatar_url}}" mode="aspectFill"></image>
|
||
<block wx:else>{{item.emoji}}</block>
|
||
</view>
|
||
<view class="pet-info">
|
||
<view class="tt-b">{{item.name}}</view>
|
||
<view class="tt-p">{{item.age}}|{{item.weight}}|{{item.stage}}</view>
|
||
</view>
|
||
<view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>
|
||
</view>
|
||
<view wx:if="{{!pets.length}}" class="empty">还没有毛孩子,先建一份档案</view>
|
||
</view>
|
||
|
||
<!-- 常用入口。设置类的都收进设置页了,这里只留高频的 -->
|
||
<view class="profile-list">
|
||
<view class="profile-row" bindtap="goPetForm">
|
||
<view class="pr-ic"><pt-icon name="user" size="{{34}}"></pt-icon></view>
|
||
<text class="pr-label">宠物档案</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>
|
||
</view>
|
||
<view class="profile-row" bindtap="goPlan">
|
||
<view class="pr-ic"><pt-icon name="plan" size="{{34}}"></pt-icon></view>
|
||
<text class="pr-label">养护计划</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>
|
||
</view>
|
||
<view class="profile-row" data-type="managePets" bindtap="openSheet">
|
||
<view class="pr-ic"><pt-icon name="community" size="{{34}}"></pt-icon></view>
|
||
<text class="pr-label">多宠物管理</text><text class="pr-val">{{card.stats.pet_count || 0}} 只</text>
|
||
<view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>
|
||
</view>
|
||
<view class="profile-row" bindtap="goSettings">
|
||
<view class="pr-ic"><pt-icon name="settings" size="{{34}}"></pt-icon></view>
|
||
<text class="pr-label">设置</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
|
||
<bottom-sheet show="{{sheetShow}}" type="{{sheetType}}" bind:close="closeSheet"></bottom-sheet>
|