feat(fe): 首页改成品牌活泼版(本次设计语言的样板页)
- 门面换成完成度环 + 状态 chip:一眼能看到「今天还剩几件事」, 原来的 hero 卡只是把宠物信息平铺,占了 340rpx 却没给出任何判断 - 快速记录 8 宫格从 emoji 换成图标 + 4 色分类(体重/疫苗=橙、 便便/饮食=绿、异常/用药=蓝、消费/照片=紫),靠颜色分组而不是靠认 emoji - AI 建议卡底部加深色 CTA,全页唯一的深色块,指明主操作 - 顶部 🔔⚙ 换成图标;日期条、任务卡、空态全部走 token - 任务列表落地时顺手算未完成数,门面文案由它驱动 后 8 页按这套语言套用,不再重新发明。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,30 +5,34 @@
|
||||
<view class="top-row">
|
||||
<view class="greeting">
|
||||
<view class="greet-h2">{{summary.greeting || '你好'}}</view>
|
||||
<view class="greet-p">今天也要照顾好 {{pet.name}} 🐾</view>
|
||||
<view class="greet-p">今天也要照顾好 {{pet.name}}</view>
|
||||
</view>
|
||||
<view class="icon-stack">
|
||||
<view class="icon-btn" data-type="reminders" bindtap="openSheet">🔔</view>
|
||||
<view class="icon-btn" bindtap="goProfile">⚙</view>
|
||||
<view class="icon-btn" data-type="reminders" bindtap="openSheet"><pt-icon name="bell" size="{{36}}"></pt-icon></view>
|
||||
<view class="icon-btn" bindtap="goProfile"><pt-icon name="settings" size="{{36}}"></pt-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<pet-switch bind:add="onAddPet"></pet-switch>
|
||||
|
||||
<view class="card hero-card">
|
||||
<view class="pet-row" bindtap="onEditPet">
|
||||
<view class="avatar">{{pet.emoji}}</view>
|
||||
<view class="pet-main">
|
||||
<view class="pet-name-b">{{pet.name}}</view>
|
||||
<view class="pet-meta">{{pet.age}}|{{pet.weight}}|{{pet.stage}}</view>
|
||||
<!-- 门面:完成度环 + 当下状态。点进去编辑档案 -->
|
||||
<view class="card hero-card" bindtap="onEditPet">
|
||||
<view class="hero-row">
|
||||
<stat-ring percent="{{summary.health_pct}}" size="{{168}}">
|
||||
<view class="ring-num">{{summary.health_pct}}<text class="ring-unit">%</text></view>
|
||||
<view class="ring-cap">完成度</view>
|
||||
</stat-ring>
|
||||
<view class="hero-main">
|
||||
<view class="hero-title">{{pet.name || '还没有毛孩子'}}</view>
|
||||
<view class="hero-sub">{{undoneText}}</view>
|
||||
<view class="chip-row">
|
||||
<view wx:for="{{heroChips}}" wx:key="text" class="chip {{item.tone}}">
|
||||
<pt-icon name="{{item.icon}}" size="{{22}}"></pt-icon>{{item.text}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tag">{{summary.health_status || '正常'}}</view>
|
||||
</view>
|
||||
<view class="progress-row"><text>本周健康完成度</text><text>{{summary.health_pct}}%</text></view>
|
||||
<view class="bar"><view class="bar-fill" style="width:{{summary.health_pct}}%"></view></view>
|
||||
<scroll-view wx:if="{{summary.insights.length}}" class="insight-row" scroll-x="true" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<view wx:for="{{summary.insights}}" wx:key="text" class="insight"><text class="insight-b">{{item.bold}}</text>{{item.text}}</view>
|
||||
</scroll-view>
|
||||
<view class="hero-meta">{{pet.age}}|{{pet.weight}}|{{pet.stage}}</view>
|
||||
</view>
|
||||
|
||||
<view class="date-strip">
|
||||
@@ -50,11 +54,11 @@
|
||||
</view>
|
||||
<view class="task-list">
|
||||
<view wx:for="{{tasks}}" wx:key="title" class="task {{item.done ? 'done' : ''}}" data-index="{{index}}" bindtap="onTapTask">
|
||||
<view class="circle">✓</view>
|
||||
<view class="task-text"><text class="tt-b">{{item.title}}</text><view class="tt-p">{{item.sub}}</view></view>
|
||||
<view class="circle"><pt-icon wx:if="{{item.done}}" name="check" size="{{22}}"></pt-icon></view>
|
||||
<view class="task-text"><text class="tt-b">{{item.title}}</text><view wx:if="{{item.sub}}" class="tt-p">{{item.sub}}</view></view>
|
||||
<view wx:if="{{item.priority}}" class="priority">{{item.priority}}</view>
|
||||
</view>
|
||||
<view wx:if="{{tasks.length === 0}}" class="task-empty">这天没有任务记录</view>
|
||||
<view wx:if="{{tasks.length === 0}}" class="empty">这天没有任务记录</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -64,23 +68,20 @@
|
||||
<view class="link" bindtap="goRecord">更多</view>
|
||||
</view>
|
||||
<view class="quick-grid">
|
||||
<view class="quick" data-type="weight" bindtap="openSheet"><text class="q-ic">⚖️</text>体重</view>
|
||||
<view class="quick" data-type="poop" bindtap="openSheet"><text class="q-ic">💩</text>便便</view>
|
||||
<view class="quick" data-type="food" bindtap="openSheet"><text class="q-ic">🍽️</text>饮食</view>
|
||||
<view class="quick" data-type="symptom" bindtap="openSheet"><text class="q-ic">🤒</text>异常</view>
|
||||
<view class="quick" data-type="cost" bindtap="openSheet"><text class="q-ic">💰</text>消费</view>
|
||||
<view class="quick" data-type="medicine" bindtap="openSheet"><text class="q-ic">💊</text>用药</view>
|
||||
<view class="quick" data-type="photo" bindtap="openSheet"><text class="q-ic">📷</text>照片</view>
|
||||
<view class="quick" data-type="vaccine" bindtap="openSheet"><text class="q-ic">💉</text>疫苗</view>
|
||||
<view wx:for="{{quickItems}}" wx:key="type" class="quick {{item.tone}}" data-type="{{item.type}}" bindtap="openSheet">
|
||||
<pt-icon name="{{item.icon}}" size="{{44}}"></pt-icon>{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card ai-banner">
|
||||
<view class="card">
|
||||
<view class="section-head">
|
||||
<view class="sh-title">AI 今日建议</view>
|
||||
<view class="link" data-type="ai" bindtap="openSheet">问问 AI</view>
|
||||
</view>
|
||||
<view class="ai-text">{{summary.advice || '正在生成今日建议…'}}</view>
|
||||
<view class="btn btn-dark btn-block ai-cta" data-type="ai" bindtap="openSheet">
|
||||
<pt-icon name="ai" size="{{32}}"></pt-icon>问问 AI 养宠助手
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
@@ -89,7 +90,7 @@
|
||||
<view class="link" bindtap="goLearn">查看</view>
|
||||
</view>
|
||||
<view wx:if="{{firstArticle}}" class="article-card no-shadow" style="margin-bottom:0" bindtap="openFirstArticle">
|
||||
<view class="article-icon">{{firstArticle.icon}}</view>
|
||||
<view class="article-icon"><pt-icon name="{{firstArticle.icon}}" size="{{48}}" fallback="book"></pt-icon></view>
|
||||
<view><text class="ac-b">{{firstArticle.title}}</text><view class="ac-p">{{firstArticle.desc}}</view></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user