feat(i18n): 剩余15页全量接入中英(登录/注册/扫码/绑定/佩戴/扫描/治疗/订阅/帮助等)

- 3 个并行 agent 各管 5 页,互不重叠命名空间
- 全 App 18 页均 i18n.bind,22 命名空间/400 键中英对齐
- 动态文案(时长/天数/价格/区域)JS 内 i18n.t 计算;区域标签复用 common.regions
这个提交包含在:
Guoguo
2026-07-19 06:00:04 -07:00
父节点 f5eaf05067
当前提交 4466c53c7b
修改 45 个文件,包含 842 行新增268 行删除
+9 -4
查看文件
@@ -1,6 +1,7 @@
var ble = require('../../services/ble')
var api = require('../../utils/api')
var diagnosis = require('../../services/diagnosis')
var i18n = require('../../i18n/index')
var SCAN_TIMEOUT = 180000
Page({
@@ -31,6 +32,10 @@ Page({
})
},
onShow: function () {
i18n.bind(this)
},
_cleanup: function () {
if (this._timeoutTimer) { clearTimeout(this._timeoutTimer); this._timeoutTimer = null }
if (this._onAdc) { ble.off('adc', this._onAdc); this._onAdc = null }
@@ -42,7 +47,7 @@ Page({
var self = this
if (!ble.isConnected()) {
self.setData({ error: '设备未连接' })
self.setData({ error: i18n.t('common.deviceNotConnected') })
return
}
@@ -90,7 +95,7 @@ Page({
console.log('[SCAN] 未贴合,检测失败')
self._completed = true
self._cleanup()
self.setData({ phase: 'ready', error: '面膜未佩戴好,请重新佩戴后再试' })
self.setData({ phase: 'ready', error: i18n.t('autoScan.notWorn') })
return
}
@@ -129,7 +134,7 @@ Page({
}).catch(function (err) {
console.error('[SCAN] 检测命令发送失败:', err)
self._cleanup()
self.setData({ phase: 'ready', error: '检测命令发送失败' })
self.setData({ phase: 'ready', error: i18n.t('autoScan.cmdFailed') })
})
self._timeoutTimer = setTimeout(function () {
@@ -140,7 +145,7 @@ Page({
} else {
self._completed = true
self._cleanup()
self.setData({ phase: 'ready', error: '检测超时,未收到数据,请重试' })
self.setData({ phase: 'ready', error: i18n.t('autoScan.timeout') })
}
}, SCAN_TIMEOUT)
},