feat(i18n): 剩余15页全量接入中英(登录/注册/扫码/绑定/佩戴/扫描/治疗/订阅/帮助等)
- 3 个并行 agent 各管 5 页,互不重叠命名空间 - 全 App 18 页均 i18n.bind,22 命名空间/400 键中英对齐 - 动态文案(时长/天数/价格/区域)JS 内 i18n.t 计算;区域标签复用 common.regions
这个提交包含在:
@@ -1,5 +1,6 @@
|
||||
var api = require('../../utils/api')
|
||||
var ble = require('../../services/ble')
|
||||
var i18n = require('../../i18n/index')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@@ -15,6 +16,10 @@ Page({
|
||||
synced: false
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
i18n.bind(this)
|
||||
},
|
||||
|
||||
onBack: function () {
|
||||
wx.reLaunch({ url: '/pages/index/index' })
|
||||
},
|
||||
@@ -33,7 +38,7 @@ Page({
|
||||
regions: parseInt(options.regions) || 0,
|
||||
duration: durationMs,
|
||||
avgPd: options.avg_pd || 0,
|
||||
durationText: mins > 0 ? mins + '分钟' : secs + '秒',
|
||||
durationText: mins > 0 ? i18n.t('treatmentDone.durationMin', { min: mins }) : i18n.t('treatmentDone.durationSec', { sec: secs }),
|
||||
mode: parseInt(options.mode) || 0,
|
||||
regionNames: ble.getRegionName(parseInt(options.regions) || 0)
|
||||
})
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<view class="page">
|
||||
<view class="page-header page-header-green" 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.treatmentDone.title}}</view>
|
||||
<view class="page-header-subtitle">{{i18n.treatmentDone.headerSub}}</view>
|
||||
</view>
|
||||
|
||||
<view class="page-content">
|
||||
<view class="result-icon">✓</view>
|
||||
<view class="result-title">使用完成!</view>
|
||||
<view class="result-title">{{i18n.treatmentDone.resultTitle}}</view>
|
||||
|
||||
<view class="result-data">
|
||||
<view class="result-item">
|
||||
<view class="result-value">{{durationText}}</view>
|
||||
<view class="result-label">使用时长</view>
|
||||
<view class="result-label">{{i18n.treatmentDone.durationLabel}}</view>
|
||||
</view>
|
||||
<view class="result-item">
|
||||
<view class="result-value">{{regionNames.length}}</view>
|
||||
<view class="result-label">使用区域</view>
|
||||
<view class="result-label">{{i18n.treatmentDone.regionLabel}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="result-tip">
|
||||
<text class="result-tip-icon">✨</text>
|
||||
<text class="result-tip-text">本次使用已记录</text>
|
||||
<text class="result-tip-text">{{i18n.treatmentDone.recorded}}</text>
|
||||
</view>
|
||||
|
||||
<button class="btn-primary" bindtap="onBackHome">返回首页</button>
|
||||
<button class="btn-primary" bindtap="onBackHome">{{i18n.treatmentDone.backHome}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
在新工单中引用
屏蔽一个用户