Files
sundynix-pets/pets-fe/pages/profile/profile.wxml
T
Blizzard 2fd25e26ef 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>
2026-07-29 10:54:18 +08:00

38 lines
3.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.
<nav-bar title="我的" show-back="{{true}}"></nav-bar>
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="page-body">
<view class="profile-header">
<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"><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"><pt-icon name="plus" size="{{30}}"></pt-icon>添加毛孩子</button>
<view class="profile-list">
<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"><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>
</view>
</scroll-view>
<fab bind:tap="onFab"></fab>
<bottom-sheet show="{{sheetShow}}" type="{{sheetType}}" bind:close="closeSheet"></bottom-sheet>