fix: 修改index数据来源
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 44s
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 44s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user