fix: 修改index数据来源
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 44s

This commit is contained in:
sexygoat
2026-04-14 10:50:48 +08:00
parent 1a407924de
commit 5fa2b6dacf
4 changed files with 108 additions and 56 deletions

View File

@@ -47,6 +47,8 @@
identifier: { type: String, default: '' }
});
const emit = defineEmits(['packageLoaded']);
const userStore = useUserStore();
// 流量数据
@@ -117,11 +119,15 @@
totalMB.value = activePackage.data_limit_mb || 0;
remainMB.value = totalMB.value - usedMB.value;
}
// 将套餐信息(包括到期时间)传递给父组件
emit('packageLoaded', activePackage);
} else {
// 没有生效中的套餐
usedMB.value = 0;
totalMB.value = 0;
remainMB.value = 0;
emit('packageLoaded', null);
}
} catch (e) {
console.error('加载套餐流量数据失败', e);