- 新协议《协议简述-添加扫描时光色》落地: FFE4 Byte17 高3位=扫描光色(1红/2红外/3紫外/4暖黄), 低5位保留贴合状态; Byte18=0xFF 故障; auto-scan 按光色分桶采集(旧固件无标识归 red 桶降级) - diagnosis.js 重写: PD极性(值大=吸收多,固件已确认) NR=本区/本色5区平均-1; 每区4色argmax>0.10判定; 3路PD区几何平均+MAD剔奇异(3σ对n=3失效,审计实证); 严重度0.05/0.15/0.30仅展示; 全参数走 diagnosis_config 热调(极性/阈值/PD映射/亮度) - buildVendorCommand 支持 plan 多区多色单命令下发(每IO独立 红/红外/紫外/暖黄); builder层安全硬上限 治疗亮度≤204(80%) 时长≤600s - 区域映射修正: 掩码=IO纵列 左0x01/中上0x02/中0x04/中下0x08/右0x10, 修复 treatment-setup/manual/treating/getRegionName/i18n 共7处标签错位, FULL_FACE 0x7F→0x1F - 扫描报告页: 新增分区面罩示意图(5区按推荐光着色+模式名+严重度,点击跳光疗介绍), 推荐护理改一条命令多色下发(亮度204); 扫描中设备故障即时中止 - schema.sql diagnosis_config 种子更新(新结构); i18n 清理死键,中英对齐25/24键
38 行
1.1 KiB
JavaScript
38 行
1.1 KiB
JavaScript
var i18n = require('../../i18n/index')
|
||
|
||
Page({
|
||
data: {
|
||
statusBarHeight: 44,
|
||
// Ordered list of lights; strings live in i18n under lightInfo.lights[key],
|
||
// colors are presentation-only and stay in JS.
|
||
lights: [
|
||
{ key: 'red', color: '#E8503A' },
|
||
{ key: 'uv', color: '#7C4DFF' },
|
||
{ key: 'yellow', color: '#F5B841' },
|
||
{ key: 'infrared', color: '#8B2E3C' }
|
||
],
|
||
// Parallel to i18n.lightInfo.modes (matched by index).
|
||
modeColors: ['#E8503A', '#7C4DFF', '#F5B841', '#8B2E3C', '#F08AA8']
|
||
},
|
||
|
||
onLoad: function (options) {
|
||
var app = getApp()
|
||
// 报告页分区跳转带 ?wave=red|ir|uv|yellow,高亮对应光卡片('ir' 对应本页 key 'infrared')
|
||
var focus = (options && options.wave) || ''
|
||
if (focus === 'ir') focus = 'infrared'
|
||
this.setData({ statusBarHeight: app.globalData.statusBarHeight, focusWave: focus })
|
||
},
|
||
|
||
onShow: function () {
|
||
i18n.bind(this)
|
||
},
|
||
|
||
onBack: function () {
|
||
wx.navigateBack({
|
||
fail: function () {
|
||
wx.switchTab({ url: '/pages/profile/profile' })
|
||
}
|
||
})
|
||
}
|
||
})
|