81 lines
2.4 KiB
Plaintext
81 lines
2.4 KiB
Plaintext
<view class="screen walk-screen">
|
|
<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}}"
|
|
bind:change="pick"
|
|
/>
|
|
<view wx:if="{{!pets.length}}" class="empty">
|
|
先到「宠物」添加你的柯基吧 🐕
|
|
</view>
|
|
<button
|
|
wx:if="{{!walk||walk.status==='finished'}}"
|
|
class="primary main-button"
|
|
bindtap="start"
|
|
>
|
|
开始遛狗 →
|
|
</button>
|
|
<view wx:else class="actions">
|
|
<button
|
|
class="secondary"
|
|
data-kind="{{walk.status==='active'?'pause':'resume'}}"
|
|
bindtap="action"
|
|
>
|
|
{{walk.status==='active'?'暂停':'继续'}}
|
|
</button>
|
|
<button class="primary" data-kind="finish" bindtap="action">
|
|
结束遛狗
|
|
</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>
|
|
<view class="privacy">
|
|
🔒 只有你主动打开分享时,朋友才能查看这次遛狗的位置。
|
|
</view>
|
|
</view>
|
|
<tab-bar current="/pages/walk/walk" />
|