Files
Pet3/miniprogram/pages/records/records.wxml
2026-06-25 18:24:29 +08:00

49 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<view class="page">
<!-- ===== 空状态 6b ===== -->
<block wx:if="{{isEmpty}}">
<view class="empty-hero">
<view class="paw">🐾</view>
<view class="empty-title">{{dogName}}已经在门口等了</view>
<view class="empty-sub">第一次遛狗,从下面那个橙色按钮开始。走完一程,这里就有它的第一条记录啦。</view>
<button class="btn primary start-btn" bindtap="startWalk"><text class="btn-ico">🐾</text>带{{dogName}}出门</button>
</view>
<view class="row-head"><text class="rh-title">成就墙</text><text class="rh-more">0 / {{total}} 待解锁</text></view>
<view class="wall">
<view wx:for="{{wall}}" wx:key="key" class="medal-item locked">
<view class="medal">🔒</view>
<view class="medal-name">{{item.name}}</view>
</view>
</view>
</block>
<!-- ===== 正常态 6 ===== -->
<block wx:else>
<view class="row-head" bindtap="goAch">
<text class="rh-title">成就墙</text>
<text class="rh-more">全部 {{unlockedCount}}/{{total}} </text>
</view>
<view class="wall" bindtap="goAch">
<view wx:for="{{wall}}" wx:key="key" class="medal-item {{item.unlocked?'':'locked'}}">
<view class="medal">{{item.unlocked ? '🏅' : '🔒'}}</view>
<view class="medal-name">{{item.name}}</view>
</view>
</view>
<view class="row-head bordered">
<text class="rh-title">遛狗历史</text>
<text class="rh-more" catchtap="openAdd"> 补记</text>
</view>
<view class="rows">
<view wx:for="{{walks}}" wx:key="_id" class="walk-row {{item.isManual?'manual':''}}">
<view class="wr-ico">{{item.isManual ? '✎' : '🐾'}}</view>
<view class="wr-body">
<view class="wr-title">{{item.title}}<text wx:if="{{item.isManual}}" class="tag">补记</text></view>
<view class="wr-sub">{{item.sub}}</view>
</view>
</view>
</view>
</block>
<manual-add-sheet id="addSheet" dogs="{{dogs}}" bind:saved="onSaved" />
</view>