feat(fe): 弹层样式对齐 token(不动结构,不动写库值)
bottom-sheet 是 1245 行 / 28 种 type 的上帝组件,任何结构改动都会把 UI 重构变成功能重构,两类风险叠加后无法定位。所以这次严格限定: 改了:组件私有样式的值(圆角/字号/间距/配色走 token) 改了:wxml 里 5 处纯展示的 emoji → pt-icon(风险等级 ⚠️、勾选 ✓、 删图 ×、加图 +、已开通 Pro ✓) 没动:innerType 分发链、wx:if/elif 顺序、任何 data-*、onSave 的 payload 没动:8 处 data-icon="💩" 和 bottom-sheet.js 里 36 处 icon 字面量 —— 这些是写进数据库的值,改了会让历史数据和新数据分裂成两套且 回滚不回来。清理它需要给 HealthRecord 加 icon 枚举 + migration, 是独立任务。 sheet-scroll 上限从 78vh 提到 80vh:圆角和间距变化后,exportData / manageTasks / comments 这三型最容易从「内滚」变成被截断。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,7 +75,7 @@ module.exports.sel = function (map, key, index, def) {
|
||||
<!-- AI 观察建议 -->
|
||||
<block wx:elif="{{innerType === 'risk'}}">
|
||||
<view class="sheet-h3">AI 观察建议</view>
|
||||
<view class="risk-box">⚠️ 风险等级:{{riskData ? riskData.risk_level : '中'}}</view>
|
||||
<view class="risk-box"><pt-icon name="warn" size="{{32}}"></pt-icon> 风险等级:{{riskData ? riskData.risk_level : '中'}}</view>
|
||||
<view class="sheet-p"><text class="bold">可能原因:</text>{{riskData ? riskData.causes : '可能与换粮、应激或消化不适有关。不要把这里写成诊断结论。'}}</view>
|
||||
<view class="sheet-p"><text class="bold">建议:</text>{{riskData ? riskData.suggestion : '继续观察精神、食欲和排便;暂停新食物;记录呕吐或腹泻次数。'}}</view>
|
||||
<view class="sheet-p"><text class="bold">建议就医:</text>{{riskData ? riskData.seek_care : '如果持续超过 24 小时,或伴随便血、精神明显变差、频繁呕吐,建议尽快就医。'}}</view>
|
||||
@@ -232,9 +232,9 @@ module.exports.sel = function (map, key, index, def) {
|
||||
<view class="sheet-h3">肉垫计划 Pro</view>
|
||||
<view class="sheet-p">解锁 365 天计划、PDF 健康档案、月度报告、多宠物管理与年度账单。</view>
|
||||
<view class="check-list">
|
||||
<view wx:for="{{proInfo.features}}" wx:key="*this" class="check selected"><view class="box">✓</view>{{item}}</view>
|
||||
<view wx:for="{{proInfo.features}}" wx:key="*this" class="check selected"><view class="box"><pt-icon name="check" size="{{26}}"></pt-icon></view>{{item}}</view>
|
||||
</view>
|
||||
<button wx:if="{{proInfo.status === 'active'}}" class="btn btn-soft btn-block" bindtap="close">已开通 Pro ✓</button>
|
||||
<button wx:if="{{proInfo.status === 'active'}}" class="btn btn-soft btn-block" bindtap="close"><pt-icon name="check" size="{{30}}"></pt-icon>已开通 Pro</button>
|
||||
<button wx:else class="btn btn-soft btn-block" disabled="true">即将开放</button>
|
||||
<view wx:if="{{proInfo.status !== 'active'}}" class="sheet-p" style="text-align:center;margin-top:16rpx;font-size:24rpx">
|
||||
会员功能还在准备中,暂未开放购买。
|
||||
@@ -292,9 +292,9 @@ module.exports.sel = function (map, key, index, def) {
|
||||
<view class="img-picker">
|
||||
<view wx:for="{{postImages}}" wx:key="id" class="img-thumb">
|
||||
<image src="{{item.url}}" mode="aspectFill"></image>
|
||||
<view class="img-del" catchtap="onRemovePostImage" data-index="{{index}}">×</view>
|
||||
<view class="img-del" catchtap="onRemovePostImage" data-index="{{index}}"><pt-icon name="close" size="{{24}}"></pt-icon></view>
|
||||
</view>
|
||||
<view wx:if="{{postImages.length < 9}}" class="img-add" bindtap="onPickPostImages">+</view>
|
||||
<view wx:if="{{postImages.length < 9}}" class="img-add" bindtap="onPickPostImages"><pt-icon name="plus" size="{{48}}"></pt-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="btn btn-primary btn-block" bindtap="onCreatePost">发布到宠友圈</button>
|
||||
|
||||
Reference in New Issue
Block a user