Files
sundynix-pets/pets-fe/pages/home/home.wxml
T

84 lines
2.6 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">
<view class="eyebrow">你好,今天也一起好好生活</view>
<view class="row top">
<view class="title">早安,{{name}} ☀️</view>
<image src="/assets/logo-corgi-v2.png" class="avatar" />
</view>
<view class="hero">
<view class="hero-copy">
<text class="hero-small">今日的主角</text>
<text class="hero-title">小短腿,出发吧!</text>
<text class="hero-meta">多只狗狗 · 每一天都是好日子</text>
<view class="hero-caption">● 陪伴它们的每一天,都值得记录</view>
</view>
<image src="/assets/corgi-family-five.png" mode="aspectFit" />
</view>
<view class="row heading">
<text class="section-title">带它们出去走走</text>
<text class="link" bindtap="goWalks">遛狗记录 ›</text>
</view>
<view class="card walk-card">
<view class="walk-intro">
<view class="dog-emoji">🐕</view>
<view>
<view class="walk-title">今天的风刚刚好</view>
<view class="muted">选择同行的狗狗,一起出门转转。</view>
</view>
</view>
<view class="picker-label">这次带谁?可以多选</view>
<pet-picker pets="{{pets}}" selected="{{selected}}" bind:change="pick" />
<button class="primary start" bindtap="start">开始遛狗 →</button>
</view>
<view class="stats">
<view>
<text>本月遛狗</text>
<strong>
{{walkCount}}
<small>次</small>
</strong>
</view>
<view>
<text>一起出发</text>
<strong>
{{selected.length}}
<small>只</small>
</strong>
</view>
<view>
<text>今日任务</text>
<strong>
{{tasks.length}}
<small>项</small>
</strong>
</view>
</view>
<view class="row heading">
<text class="section-title">今天要做的事</text>
<text class="link" bindtap="goTasks">全部任务 ›</text>
</view>
<view class="card tasks">
<view
wx:for="{{tasks}}"
wx:key="id"
class="task"
data-id="{{item.id}}"
bindtap="complete"
>
<view class="check {{item.completed?'done':''}}">
{{item.completed?'✓':''}}
</view>
<view class="task-icon">
{{item.category==='water'?'💧':item.category==='food'?'🥣':'🐾'}}
</view>
<view class="task-main">
<text class="task-name">{{item.title}}</text>
<text class="muted">{{item.time_of_day}}</text>
</view>
</view>
<view wx:if="{{!tasks.length}}" class="empty">
今天还没有任务,给狗狗安排一件小事吧 🐾
</view>
</view>
</view>
<tab-bar current="/pages/home/home" />