From 5de611d28fe12e667744d35651647f87e645117f Mon Sep 17 00:00:00 2001 From: sexygoat <1538832180@qq.com> Date: Mon, 27 Apr 2026 14:56:06 +0800 Subject: [PATCH] fix: ll --- components/TrafficCard.vue | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/components/TrafficCard.vue b/components/TrafficCard.vue index 53ea746..4d37bb2 100644 --- a/components/TrafficCard.vue +++ b/components/TrafficCard.vue @@ -108,17 +108,13 @@ // 只有一个生效中的套餐 const activePackage = data.items[0]; - if (activePackage.enable_virtual_data) { - // 启用虚流量 +if (activePackage.enable_virtual_data) { usedMB.value = activePackage.virtual_used_mb || 0; - totalMB.value = activePackage.data_limit_mb || 0; - remainMB.value = activePackage.virtual_remain_mb || 0; } else { - // 未启用虚流量,使用真流量 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);