- services/diagnosis.js: 诊断流水线框架,阈值/PD映射为占位待标定,支持单波长降级 - auto-scan: 扫描完成改为出报告让用户选择护理(替代原自动开始治疗) - 新增 scan-report/manual-treatment/light-info 三页,全部接入 i18n - api.js: 新增 report/diagnosis-config 接口(对接后端契约)
35 行
863 B
JavaScript
35 行
863 B
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 () {
|
|
var app = getApp()
|
|
this.setData({ statusBarHeight: app.globalData.statusBarHeight })
|
|
},
|
|
|
|
onShow: function () {
|
|
i18n.bind(this)
|
|
},
|
|
|
|
onBack: function () {
|
|
wx.navigateBack({
|
|
fail: function () {
|
|
wx.switchTab({ url: '/pages/profile/profile' })
|
|
}
|
|
})
|
|
}
|
|
})
|