diff --git a/src/views/home/modules/header-banner.vue b/src/views/home/modules/header-banner.vue index 9359d0a..83f8d16 100644 --- a/src/views/home/modules/header-banner.vue +++ b/src/views/home/modules/header-banner.vue @@ -87,7 +87,8 @@ const baseData = ref([ max: 100, unit: t('page.headerbanner.money'), description: t('page.headerbanner.monthphonebill'), - subTitle: t('page.headerbanner.deviceCount') + `: 0${t('page.headerbanner.device')}` + subTitle: t('page.headerbanner.deviceCount') + `: 0${t('page.headerbanner.device')}`, + displayValue: '-' }, { id: 1, @@ -294,7 +295,7 @@ async function mockDataUpdate() { // 更新套餐信息 packageInfo.value = { packageName: response.packageName || t('page.headerbanner.nopackage'), - price: response.price ? formatBalance(response.price) : '-' + price: response.packageName ? formatBalance(response.price) : '-' // 有套餐时才格式化价格 }; // 更新余额和设备数据 @@ -303,7 +304,7 @@ async function mockDataUpdate() { ...baseData.value[0], value: numBalance, max: Math.max(numBalance, 100), - displayValue: formatBalance(response.balance), + displayValue: response.packageName ? formatBalance(response.balance) : '-', unit: t('page.headerbanner.money'), subTitle: t('page.headerbanner.deviceCount') + `: ${ response.packageName ? ( @@ -497,7 +498,7 @@ const getDeviceCount = (subTitle?: string, clientNumEnable?: boolean): string =>
{{ t('page.headerbanner.price') }} - ¥{{ packageInfo.price || '-' }} + {{ packageInfo.price === '-' ? '-' : '¥' + packageInfo.price }}
{{ t('page.headerbanner.monthflowr') }} @@ -524,7 +525,7 @@ const getDeviceCount = (subTitle?: string, clientNumEnable?: boolean): string =>
{{ t('page.headerbanner.Remainingcredit') }} - ¥{{ baseData[0].displayValue }} + {{ baseData[0].displayValue === '-' ? '-' : '¥' + baseData[0].displayValue }}
{{ t('page.headerbanner.client') }}