Files
sundynix-pets/pets-fe/pages/walk/walk.wxml
T
Blizzard 46ac8f8a47
ci-cd / verify (push) Successful in 4s
ci-cd / deploy (push) Skipped
Respect mini program status bar and menu safe area
2026-10-04 09:53:07 +08:00

87 lines
2.8 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="screen walk-screen">
<safe-top />
<view class="eyebrow">PAWPRINT WALK</view>
<view class="title">一起去兜风</view>
<view class="map-box">
<map
id="walk-map"
latitude="{{latitude}}"
longitude="{{longitude}}"
scale="16"
show-location="{{walk!=null}}"
polyline="{{polyline}}"
style="width: 100%; height: 100%"
/>
<view class="map-tag">
{{walk?walk.status==='active'?'记录中':'已暂停':'等待出发'}}
</view>
</view>
<view class="card session">
<view class="eyebrow">{{walk?'快乐进行时':'出门走走吧'}}</view>
<view class="session-title">
{{walk?'跟小短腿一起探索':'选择今天同行的狗狗'}}
</view>
<view class="stats">
<view>
<strong>{{duration}}</strong>
<text>时长</text>
</view>
<view>
<strong>{{distance}}</strong>
<text>公里</text>
</view>
<view>
<strong>{{points.length}}</strong>
<text>足迹</text>
</view>
</view>
<view class="picker-title">同行伙伴 · 可多选</view>
<pet-picker
pets="{{pets}}"
selected="{{walk?walk.pet_ids:selected}}"
disabled="{{walk!==null}}"
bind:change="pick"
/>
<view wx:if="{{!pets.length}}" class="empty">
先到「宠物」添加你的柯基吧 🐕
</view>
<button
wx:if="{{!walk||walk.status==='finished'}}"
class="primary main-button"
bindtap="start"
disabled="{{busy}}"
>
开始遛狗 →
</button>
<view wx:else class="actions">
<button
class="secondary"
data-kind="{{walk.status==='active'?'pause':'resume'}}"
bindtap="action"
disabled="{{busy}}"
>
{{walk.status==='active'?'暂停':'继续'}}
</button>
<button class="primary" data-kind="finish" bindtap="action" disabled="{{busy}}">
结束遛狗
</button>
</view>
<view wx:if="{{walk&&walk.status!=='finished'}}" class="share-row">
<view>
<strong>分享实时位置</strong>
<text>打开后可分享给朋友,结束遛狗会自动关闭</text>
</view>
<switch color="#278465" checked="{{share}}" bindchange="shareChange" />
</view>
<button wx:if="{{share}}" class="share-button" open-type="share">
发给朋友看位置 ↗
</button>
<view wx:if="{{locationError}}" class="location-error" bindtap="point">{{locationError}} · 点击重试</view>
</view>
<button class="records-button" bindtap="records">查看最近的脚印 ›</button>
<view class="privacy">
🔒 只有你主动打开分享时,朋友才能查看位置。保持小程序打开,位置才会持续更新。
</view>
</view>
<tab-bar current="/pages/walk/walk" />