This commit is contained in:
@@ -108,17 +108,13 @@
|
|||||||
// 只有一个生效中的套餐
|
// 只有一个生效中的套餐
|
||||||
const activePackage = data.items[0];
|
const activePackage = data.items[0];
|
||||||
|
|
||||||
if (activePackage.enable_virtual_data) {
|
if (activePackage.enable_virtual_data) {
|
||||||
// 启用虚流量
|
|
||||||
usedMB.value = activePackage.virtual_used_mb || 0;
|
usedMB.value = activePackage.virtual_used_mb || 0;
|
||||||
totalMB.value = activePackage.data_limit_mb || 0;
|
|
||||||
remainMB.value = activePackage.virtual_remain_mb || 0;
|
|
||||||
} else {
|
} else {
|
||||||
// 未启用虚流量,使用真流量
|
|
||||||
usedMB.value = activePackage.data_usage_mb || 0;
|
usedMB.value = activePackage.data_usage_mb || 0;
|
||||||
totalMB.value = activePackage.data_limit_mb || 0;
|
|
||||||
remainMB.value = totalMB.value - usedMB.value;
|
|
||||||
}
|
}
|
||||||
|
totalMB.value = activePackage.data_limit_mb || 0;
|
||||||
|
remainMB.value = totalMB.value - usedMB.value;
|
||||||
|
|
||||||
// 将套餐信息(包括到期时间)传递给父组件
|
// 将套餐信息(包括到期时间)传递给父组件
|
||||||
emit('packageLoaded', activePackage);
|
emit('packageLoaded', activePackage);
|
||||||
|
|||||||
Reference in New Issue
Block a user