修改国际版本
This commit is contained in:
+17
-16
@@ -153,7 +153,8 @@
|
||||
getUserPhoneNumber
|
||||
} from '@/util/index.js'
|
||||
import {
|
||||
useI18n
|
||||
useI18n,
|
||||
showModalI18n
|
||||
} from '@/utils/i18n.js'
|
||||
import DeviceDetailSkeleton from '@/components/DeviceDetailSkeleton.vue'
|
||||
|
||||
@@ -297,7 +298,7 @@
|
||||
// 不立即抛出错误,而是记录问题并继续处理
|
||||
if (!res) {
|
||||
console.error('API返回数据为空')
|
||||
uni.showModal({
|
||||
showModalI18n({
|
||||
title: '数据异常',
|
||||
content: 'API返回为空',
|
||||
showCancel: false
|
||||
@@ -320,7 +321,7 @@
|
||||
} else {
|
||||
// 记录详细信息,不抛出错误
|
||||
console.warn('获取手机号响应异常:', res.msg || '未知错误')
|
||||
uni.showModal({
|
||||
showModalI18n({
|
||||
title: t('auth.phoneError'),
|
||||
content: `${t('common.statusCode')}: ${res.code}, ${t('common.message')}: ${res.msg || t('common.none')}`,
|
||||
showCancel: false
|
||||
@@ -333,7 +334,7 @@
|
||||
|
||||
// 显示更详细的错误信息
|
||||
let errMsg = err.message || err.toString()
|
||||
uni.showModal({
|
||||
showModalI18n({
|
||||
title: t('auth.phoneGetFailed'),
|
||||
content: t('common.errorInfo') + ': ' + errMsg,
|
||||
showCancel: false
|
||||
@@ -342,7 +343,7 @@
|
||||
} catch (outerError) {
|
||||
// uni.hideLoading()
|
||||
console.error('获取手机号外部错误:', outerError)
|
||||
uni.showModal({
|
||||
showModalI18n({
|
||||
title: t('common.unexpectedError'),
|
||||
content: t('common.processException') + ': ' + (outerError.message || outerError),
|
||||
showCancel: false
|
||||
@@ -413,7 +414,7 @@
|
||||
|
||||
// 显示登录提示
|
||||
const showLoginTip = () => {
|
||||
uni.showModal({
|
||||
showModalI18n({
|
||||
title: t('common.tips'),
|
||||
content: t('common.loginRequired'),
|
||||
confirmText: t('auth.goToLogin'),
|
||||
@@ -567,19 +568,19 @@
|
||||
// 生成详细说明文本
|
||||
const getDetailInfoText = () => {
|
||||
if (isIdrCurrency.value) {
|
||||
return `不足1${t('time.hour')}按1${t('time.hour')}计费,封顶${displayCurrencySymbol.value}${displayDepositCap.value},持续计费至${displayCurrencySymbol.value}${displayDepositCap.value}视为买断`
|
||||
const cap = `${displayCurrencySymbol.value}${displayDepositCap.value}`
|
||||
return t('device.detailBillingIdr', {
|
||||
hour: t('time.hour'),
|
||||
cap
|
||||
})
|
||||
}
|
||||
const freeMinutes = getFreeMinutes()
|
||||
const unitMinutes = getBillingUnitMinutes()
|
||||
const depositAmount = deviceInfo.value.depositAmount || '99'
|
||||
|
||||
// 按分钟计费
|
||||
if (deviceInfo.value && deviceInfo.value.feeType === 'minute') {
|
||||
return `不足${unitMinutes}分钟按${unitMinutes}分钟计费,封顶${depositAmount}元,持续计费至${depositAmount}元视为买断`
|
||||
}
|
||||
|
||||
// 按小时计费
|
||||
return `不足${unitMinutes}分钟按${unitMinutes}分钟计费,封顶${depositAmount}元,持续计费至${depositAmount}元视为买断`
|
||||
return t('device.detailBillingByUnit', {
|
||||
unit: unitMinutes,
|
||||
minute: t('time.minute'),
|
||||
cap: depositAmount
|
||||
})
|
||||
}
|
||||
|
||||
// 获取租借按钮文本
|
||||
|
||||
Reference in New Issue
Block a user