feat(fe): 其余 8 页 + 三个薄组件套用新设计语言
页面: - record:3×3 emoji 九宫格(184rpx 高、全站最大的点击块)换成图标 + 4 色分类, 和首页的 8 宫格合并成同一套 .quick-grid,此前它俩是同一个东西的两个副本 - record/plan/community:三套横向切换全部换成 seg-tabs - record/plan/community/report/learn:砍掉与 nav-bar 重复的 46rpx 大标题, 每页白赚约 130rpx 首屏 - 时间轴图标改按 HealthRecord.Type 取(9 值枚举,可靠),老数据里的 emoji 只作兜底;写库的 icon 字段一个字符没动 - profile:设置行加分类图标 + 右侧箭头换图标 - community/report:主操作改深色 CTA,btn-primary 继续留给弹层的「保存」 - 6 套空态写法统一成 .empty 组件: - nav-bar 的 ‹ 和 fab 的 "AI" 文字换成图标;fab 从蓝渐变改深色, 和全站唯一主 CTA 的语义对齐 - pet-switch 的「+」换图标;宠物自己的 emoji 是用户数据,保留 pt-icon 开了 virtualHost,组件标签上的 class 不生效,需要定位的地方 (profile 行图标、箭头)都用外层 view 包了一层。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
"usingComponents": {
|
||||
"nav-bar": "/components/nav-bar/nav-bar",
|
||||
"bottom-sheet": "/components/bottom-sheet/bottom-sheet",
|
||||
"fab": "/components/fab/fab"
|
||||
"fab": "/components/fab/fab",
|
||||
"pt-icon": "/components/pt-icon/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,27 +6,27 @@
|
||||
<view class="avatar ph-avatar" bindtap="onPickAvatar">
|
||||
<image wx:if="{{user.avatar_url}}" class="ph-avatar-img" src="{{user.avatar_url}}" mode="aspectFill"></image>
|
||||
<block wx:else>{{pet.emoji}}</block>
|
||||
<view class="ph-avatar-cam">📷</view>
|
||||
<view class="ph-avatar-cam"><pt-icon name="photo" size="{{28}}"></pt-icon></view>
|
||||
</view>
|
||||
<view class="ph-name">{{pet.name}}</view>
|
||||
<view class="muted ph-meta">{{pet.age}}|{{pet.weight}}|{{pet.stage}}</view>
|
||||
<view wx:if="{{pet.breed || pet.color}}" class="muted ph-meta">{{pet.breed}}{{pet.breed && pet.color ? ' · ' : ''}}{{pet.color}}</view>
|
||||
</view>
|
||||
|
||||
<button class="btn btn-ghost btn-block" style="margin-bottom:28rpx" bindtap="onAddPet">+ 添加毛孩子</button>
|
||||
<button class="btn btn-ghost btn-block" style="margin-bottom:28rpx" bindtap="onAddPet"><pt-icon name="plus" size="{{30}}"></pt-icon>添加毛孩子</button>
|
||||
|
||||
<view class="profile-list">
|
||||
<view class="profile-row" bindtap="onEditPet">宠物档案(编辑)<text class="pr-val">已完善 {{profilePct}}% ›</text></view>
|
||||
<view class="profile-row" data-type="reminders" bindtap="openSheet">提醒设置 <text class="pr-val">{{summary.reminders}} 条 ›</text></view>
|
||||
<view class="profile-row" bindtap="goRecord">健康记录 <text class="pr-val">{{summary.records}} 条 ›</text></view>
|
||||
<view class="profile-row" data-type="managePets" bindtap="openSheet">多宠物管理 <text class="pr-val">{{summary.pets}} 只 ›</text></view>
|
||||
<view class="profile-row" bindtap="onEditPet"><view class="pr-ic"><pt-icon name="user" size="{{34}}"></pt-icon></view><text class="pr-label">宠物档案(编辑)</text><text class="pr-val">已完善 {{profilePct}}%</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
<view class="profile-row" data-type="reminders" bindtap="openSheet"><view class="pr-ic"><pt-icon name="bell" size="{{34}}"></pt-icon></view><text class="pr-label">提醒设置</text><text class="pr-val">{{summary.reminders}} 条</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
<view class="profile-row" bindtap="goRecord"><view class="pr-ic"><pt-icon name="note" size="{{34}}"></pt-icon></view><text class="pr-label">健康记录</text><text class="pr-val">{{summary.records}} 条</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
<view class="profile-row" data-type="managePets" bindtap="openSheet"><view class="pr-ic"><pt-icon name="community" size="{{34}}"></pt-icon></view><text class="pr-label">多宠物管理</text><text class="pr-val">{{summary.pets}} 只</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
</view>
|
||||
|
||||
<view class="profile-list">
|
||||
<view class="profile-row" data-type="pro" bindtap="openSheet">会员权益 <text class="pr-val">{{summary.pro_status === 'active' ? '已开通' : '未开通'}} ›</text></view>
|
||||
<view class="profile-row" data-type="exportData" bindtap="openSheet">数据导出 <text class="pr-val">文本 ›</text></view>
|
||||
<view class="profile-row" data-type="feedback" bindtap="openSheet">意见反馈 <text class="pr-val">去填写 ›</text></view>
|
||||
<view class="profile-row" data-type="about" bindtap="openSheet">关于我们 <text class="pr-val">v0.2 ›</text></view>
|
||||
<view class="profile-row" data-type="pro" bindtap="openSheet"><view class="pr-ic"><pt-icon name="like" size="{{34}}"></pt-icon></view><text class="pr-label">会员权益</text><text class="pr-val">{{summary.pro_status === 'active' ? '已开通' : '未开通'}}</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
<view class="profile-row" data-type="exportData" bindtap="openSheet"><view class="pr-ic"><pt-icon name="doc" size="{{34}}"></pt-icon></view><text class="pr-label">数据导出</text><text class="pr-val">文本</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
<view class="profile-row" data-type="feedback" bindtap="openSheet"><view class="pr-ic"><pt-icon name="comment" size="{{34}}"></pt-icon></view><text class="pr-label">意见反馈</text><text class="pr-val">去填写</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
<view class="profile-row" data-type="about" bindtap="openSheet"><view class="pr-ic"><pt-icon name="book" size="{{34}}"></pt-icon></view><text class="pr-label">关于我们</text><text class="pr-val">v0.2</text><view class="pr-arrow"><pt-icon name="next" size="{{28}}"></pt-icon></view></view>
|
||||
</view>
|
||||
|
||||
<button class="btn btn-ghost btn-block" data-type="pro" bindtap="openSheet">Pro 会员(即将开放)</button>
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
.profile-header{text-align:center;padding:24rpx 0 32rpx}
|
||||
.ph-avatar{margin:0 auto 20rpx;width:152rpx;height:152rpx;font-size:76rpx;border-radius:56rpx;position:relative;overflow:visible}
|
||||
.ph-avatar-img{width:100%;height:100%;border-radius:56rpx}
|
||||
.ph-avatar-cam{position:absolute;right:-6rpx;bottom:-6rpx;width:52rpx;height:52rpx;line-height:52rpx;text-align:center;font-size:26rpx;background:#fff;border-radius:50%;box-shadow:var(--shadow)}
|
||||
.ph-name{font-size:44rpx;font-weight:800}
|
||||
.ph-meta{font-size:26rpx;margin-top:10rpx}
|
||||
.profile-header{text-align:center;padding:var(--sp-4) 0 var(--sp-5)}
|
||||
.ph-avatar{margin:0 auto var(--sp-3);width:152rpx;height:152rpx;font-size:76rpx;border-radius:var(--r-lg);position:relative;overflow:visible}
|
||||
.ph-avatar-img{width:100%;height:100%;border-radius:var(--r-lg)}
|
||||
.ph-avatar-cam{
|
||||
position:absolute;right:-6rpx;bottom:-6rpx;width:52rpx;height:52rpx;
|
||||
display:flex;align-items:center;justify-content:center;color:var(--text-2);
|
||||
background:#fff;border-radius:50%;box-shadow:var(--sd-1);
|
||||
}
|
||||
.ph-name{font-size:var(--fs-2xl);font-weight:var(--fw-b)}
|
||||
.ph-meta{font-size:var(--fs-sm);margin-top:var(--sp-1)}
|
||||
|
||||
.profile-list{background:#fff;border-radius:48rpx;box-shadow:var(--shadow);overflow:hidden;margin-bottom:28rpx}
|
||||
.profile-list{background:#fff;border-radius:var(--r-lg);box-shadow:var(--sd-1);overflow:hidden;margin-bottom:var(--sp-4)}
|
||||
.profile-row{
|
||||
display:flex;align-items:center;justify-content:space-between;min-height:104rpx;padding:0 32rpx;
|
||||
border-bottom:1rpx solid var(--line);font-size:28rpx;font-weight:800;
|
||||
display:flex;align-items:center;gap:var(--sp-3);min-height:104rpx;padding:0 var(--sp-4);
|
||||
border-bottom:1rpx solid var(--line);font-size:var(--fs-md);font-weight:var(--fw-b);
|
||||
}
|
||||
.profile-row:last-child{border-bottom:0}
|
||||
.pr-val{color:var(--muted);font-weight:700;font-size:26rpx}
|
||||
|
||||
/* 页面不自身滚动,改由 page-scroll 承载滚动(隐藏滚动条)*/
|
||||
.pr-ic{
|
||||
width:56rpx;height:56rpx;border-radius:var(--r-xs);flex:none;
|
||||
display:flex;align-items:center;justify-content:center;
|
||||
background:var(--primary-soft);color:var(--primary-ink);
|
||||
}
|
||||
.pr-label{flex:1;min-width:0}
|
||||
.pr-val{color:var(--muted);font-weight:var(--fw);font-size:var(--fs-sm)}
|
||||
.pr-arrow{color:var(--muted2);display:flex;align-items:center;flex:none}
|
||||
|
||||
Reference in New Issue
Block a user