feat:国际化多语言适配
This commit is contained in:
@@ -25,15 +25,21 @@
|
||||
},
|
||||
async onLoad(option) {
|
||||
console.log('bagCheck onLoad option:', option);
|
||||
|
||||
// 设置页面标题
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$t('device.checking')
|
||||
})
|
||||
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '处理中...',
|
||||
title: this.$t('common.processing'),
|
||||
mask: true
|
||||
});
|
||||
|
||||
// 检查是否传入设备编号
|
||||
if (!option || !option.deviceNo) {
|
||||
throw new Error('未识别到设备编号');
|
||||
throw new Error(this.$t('device.deviceNoNotRecognized'));
|
||||
}
|
||||
|
||||
const deviceNo = option.deviceNo;
|
||||
@@ -97,10 +103,10 @@
|
||||
error.message.includes('未识别到设备编号') ||
|
||||
error.message.includes('网络请求失败') ||
|
||||
error.message.includes('服务器错误')
|
||||
)) {
|
||||
) ) {
|
||||
console.error('扫码检查订单失败:', error);
|
||||
uni.showToast({
|
||||
title: error.message || '处理失败,请稍后重试',
|
||||
title: error.message || this.$t('device.processFailed'),
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user