修复账单周期标签的显示逻辑,确保在适当情况下显示周期信息

This commit is contained in:
hi2hi 2024-12-10 07:07:02 +00:00
parent 7bbd8455e9
commit fb3267f978

View File

@ -60,6 +60,7 @@ export default (params) => {
months = 6; months = 6;
break; break;
default: default:
cycleLabel = billingDataMod.cycle;
break; break;
} }
} }
@ -69,12 +70,12 @@ export default (params) => {
let label; let label;
if (billingDataMod.amount.toString() === '-1') { if (billingDataMod.amount.toString() === '-1') {
amountValue = '按量'; amountValue = '按量';
label = `${cycleLabel}`; label = cycleLabel ? `${cycleLabel}` : '';
} else if (billingDataMod.amount.toString() === '0') { } else if (billingDataMod.amount.toString() === '0') {
amountValue = config.nazhua.freeAmount || '免费'; amountValue = config.nazhua.freeAmount || '免费';
isFree = true; isFree = true;
} else { } else {
label = `${cycleLabel}`; label = cycleLabel ? `${cycleLabel}` : '';
} }
obj.billing = { obj.billing = {
label, label,