Files
sundynix-pets/pets-fe/pages/record/record.wxml
T
Blizzard bbc9706576 style(fe): 记录页按 preview-v3 收拾干净
## 分组那片色块是个 bug,不是设计
我把 tone-{{item.tone}} 加在分组外层是为了给组标题上色,但 .tone-N 在
app.wxss 里本身就带 background(`.tone-1{background:var(--primary-soft)}`),
于是整组被涂成一片色块——和视觉稿完全不是一回事。

分组着色单独走 g-1..g-4,只管 .tg-head 的文字色。格子的浅色底仍然是
.quick + .tone-N,那是它本来的用途。

## 另外三处
  三列 → 四列(视觉稿是四列,三列一行只放三个,洗护/清洁要多滚一屏)
  去掉组右侧的数量(6/7/6/5 —— 用户不关心一个组里有几项)
  组名去掉「记录」后缀(「日常记录」在标题位置念着啰嗦,「日常」就够)

## 去掉顶部的宠物切换和添加
这页只是个事项目录,点进去才是表单。记哪只宠物在添加页里选(那页第一行
就是「记录宠物」,多宠家庭最容易记错到别的宠物身上,放在表单里才对)。
record.json 跟着去掉 pet-switch 注册。

## .tg 挪回页面级
历史页那份宫格上一批已经删了,现在只有记录页在用,全局层只放真正共用的。
哪天别的页面要用,检查器会报「跨页借用」提醒再挪上去。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 10:53:31 +08:00

33 lines
1.7 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 no-fab">
<view wx:if="{{!pet.id}}" class="no-pet">
<view class="no-pet-ic"><pt-icon name="community" size="{{52}}"></pt-icon></view>
<view class="no-pet-b">还没有毛孩子的档案</view>
<view class="no-pet-p">建好档才能记体重、便便、饮食这些,趋势图也是从这些记录里长出来的。</view>
<view class="btn btn-dark" bindtap="onAddPet"><pt-icon name="plus" size="{{30}}"></pt-icon>建一份档案</view>
</view>
<!-- 分组来自后端 record_types,后台加一种不用发版。
组标记用 g-N 而不是 tone-Ntone-N 在 app.wxss 里自带背景色,
加在这一层会把整组涂成一片色块(本来只想给组标题上色)。
记哪只宠物在添加页里选,这页不放宠物切换——它只是个事项目录。 -->
<block wx:for="{{typeGroups}}" wx:key="key">
<view class="tg {{item.g}}">
<view class="tg-head"><view class="tg-bar"></view>{{item.short}}</view>
<view class="quick-grid">
<view wx:for="{{item.items}}" wx:for-item="t" wx:key="code" class="quick {{item.tone}}"
data-type="{{t.code}}" bindtap="goAdd">
<pt-icon name="{{t.icon}}" size="{{44}}" fallback="note"></pt-icon>{{t.label}}
</view>
</view>
</view>
</block>
<view wx:if="{{!typeGroups.length}}" class="empty lg">还没有配置可记事项</view>
</view>
</scroll-view>
<!-- 只用于「没建档 → 建一份档案」 -->
<bottom-sheet show="{{sheetShow}}" type="{{sheetType}}" bind:close="closeSheet"></bottom-sheet>