文件
jw-beauty/miniprogram/pages/manual-treatment/manual-treatment.wxml
T
Guoguo 21dccd2274 fix(mapping): correct region↔IO mapping per on-device measurement
Measured on real hardware: IO1=right IO2=left IO3=top IO4=middle IO5=bottom
(0x01=right 0x02=left 0x04=top 0x08=middle 0x10=bottom). The earlier verbal
'left=IO1/upper=IO2...' spec was wrong; this reverts to the original Phase-1
mapping, which the measurement confirms.

- protocol.js REGION constants + getRegionName + REGION_NAMES
- CRITICAL: buildVendorCommand ioMasks was built from REGION.* constants whose
  values just flipped, scrambling IO slot order; pin to literal [0x01..0x10]
- diagnosis.js REGION_DEFS key↔mask; pd_region_map values unchanged (PD is
  keyed by orientation, which is stable) — right=PD5 left=PD1 top=PD2
  middle=PD3,6,7 bottom=PD4
- common.js region labels back to right/left/top/middle/bottom (上/中/下)
- treatment-setup / manual-treatment / treating / scan-report / ble-debug
  face-map bindings and REGION_MAP realigned
- verified: mock pipeline lands left→IO2, middle→IO4 correctly
2026-07-28 07:22:36 -07:00

57 行
2.8 KiB
Plaintext
原始文件 Blame 文件历史

此文件含有模棱两可的 Unicode 字符
此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。
<view class="page">
<view class="page-header page-header-pink" style="padding-top: {{statusBarHeight + 24}}px;">
<view class="nav-back" bindtap="onBack"> {{i18n.common.back}}</view>
<view class="page-header-title">{{i18n.manual.navTitle}}</view>
<view class="page-header-subtitle">{{i18n.manual.navSubtitle}}</view>
</view>
<view class="page-content">
<view class="page-title">{{i18n.manual.functionTitle}}</view>
<view class="func-grid">
<view
wx:for="{{functions}}"
wx:key="id"
class="func-card {{selectedFunctionId === item.id ? 'active' : ''}}"
style="{{selectedFunctionId === item.id ? 'border-color:' + item.color + ';' : ''}}"
bindtap="onSelectFunction"
data-id="{{item.id}}">
<view class="func-dot" style="background: {{item.color}};"></view>
<view class="func-name">{{i18n.manual.functions[item.id].name}}</view>
<view class="func-wl" style="color: {{item.color}};">{{i18n.common.wavelengths[item.wl]}}</view>
<view class="func-benefit">{{i18n.manual.functions[item.id].benefit}}</view>
</view>
</view>
<view class="page-title section-title">{{i18n.manual.regionTitle}}</view>
<!-- 脸型图布局(与「使用设置」一致);位置↔idx:0=左 1=中上 2=中 3=中下 4=右 -->
<view class="face-map">
<view class="face-region forehead {{regions[2].checked ? 'active' : ''}}" bindtap="onToggleRegion" data-idx="2">{{i18n.common.regions.top}}</view>
<view class="face-region left-cheek {{regions[1].checked ? 'active' : ''}}" bindtap="onToggleRegion" data-idx="1">{{i18n.common.regions.left}}</view>
<view class="face-region right-cheek {{regions[0].checked ? 'active' : ''}}" bindtap="onToggleRegion" data-idx="0">{{i18n.common.regions.right}}</view>
<view class="face-region nose {{regions[3].checked ? 'active' : ''}}" bindtap="onToggleRegion" data-idx="3">{{i18n.common.regions.middle}}</view>
<view class="face-region chin {{regions[4].checked ? 'active' : ''}}" bindtap="onToggleRegion" data-idx="4">{{i18n.common.regions.bottom}}</view>
</view>
<view class="page-title section-title">{{i18n.manual.durationTitle}}</view>
<view class="segmented">
<view
wx:for="{{durationOptions}}"
wx:key="min"
class="segment {{selectedMinutes === item.min ? 'active' : ''}}"
bindtap="onSelectDuration"
data-min="{{item.min}}">
{{item.label}}
</view>
</view>
<view class="safety-tip">{{i18n.manual.safetyTip}}</view>
<button class="btn-primary" bindtap="onStart" disabled="{{submitting}}" loading="{{submitting}}">
{{submitting ? i18n.manual.starting : i18n.manual.start}}
</button>
<view class="error-text" wx:if="{{error}}">{{error}}</view>
</view>
</view>