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 行删除
+11 -6
查看文件
@@ -1,4 +1,5 @@
var http = require('../../utils/request')
var i18n = require('../../i18n/index')
Page({
data: {
@@ -8,6 +9,10 @@ Page({
error: ''
},
onShow: function () {
i18n.bind(this)
},
onBack: function () {
wx.navigateBack({
fail: function () {
@@ -31,7 +36,7 @@ Page({
success: function (res) {
var deviceId = self.parseDeviceId(res.result)
if (!deviceId) {
self.setData({ scanning: false, error: '无效的设备二维码' })
self.setData({ scanning: false, error: i18n.t('scan.invalidQr') })
return
}
self.bindDevice(deviceId)
@@ -66,12 +71,12 @@ Page({
}).catch(function (err) {
self.setData({ scanning: false })
if (err && err.code === 2001) {
wx.showToast({ title: '已绑定设备', icon: 'none' })
wx.showToast({ title: i18n.t('scan.alreadyBound'), icon: 'none' })
setTimeout(function () {
wx.navigateBack()
}, 1500)
} else {
self.setData({ error: err.message || '绑定失败' })
self.setData({ error: err.message || i18n.t('scan.bindFailed') })
}
})
},
@@ -79,16 +84,16 @@ Page({
onManualInput: function () {
var self = this
wx.showModal({
title: '手动输入设备号',
title: i18n.t('scan.manualInput'),
editable: true,
placeholderText: '请输入设备ID,如 672B6D5A 4DCD861',
placeholderText: i18n.t('scan.manualPlaceholder'),
success: function (res) {
if (res.confirm && res.content) {
var deviceId = self.parseDeviceId(res.content)
if (deviceId) {
self.bindDevice(deviceId)
} else {
wx.showToast({ title: '设备号格式不正确', icon: 'none' })
wx.showToast({ title: i18n.t('scan.invalidFormat'), icon: 'none' })
}
}
}
+6 -6
查看文件
@@ -1,20 +1,20 @@
<view class="page">
<view class="page-header page-header-pink" style="padding-top: {{statusBarHeight + 24}}px;">
<view class="nav-back" bindtap="onBack"> 返回</view>
<view class="page-header-title">扫码绑定</view>
<view class="page-header-subtitle">扫描设备底部二维码</view>
<view class="nav-back" bindtap="onBack"> {{i18n.common.back}}</view>
<view class="page-header-title">{{i18n.scan.title}}</view>
<view class="page-header-subtitle">{{i18n.scan.subtitle}}</view>
</view>
<view class="page-content">
<view class="scan-area">
<text class="scan-icon">📷</text>
<text class="scan-text">扫描设备二维码</text>
<text class="scan-text">{{i18n.scan.scanText}}</text>
</view>
<button class="btn-primary" bindtap="onScan" disabled="{{scanning}}">
{{scanning ? '扫描中...' : '扫码'}}
{{scanning ? i18n.scan.scanning : i18n.scan.scan}}
</button>
<button class="btn-secondary" bindtap="onManualInput">手动输入设备号</button>
<button class="btn-secondary" bindtap="onManualInput">{{i18n.scan.manualInput}}</button>
<view class="error-text" wx:if="{{error}}">{{error}}</view>
</view>