fix: 套餐用量显示
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Has been cancelled

This commit is contained in:
luo
2026-07-23 11:52:25 +08:00
parent db7b3562da
commit e9c0e17d6a
3 changed files with 14 additions and 20 deletions

View File

@@ -36,7 +36,7 @@
<template v-if="isAdminOrPlatform">
<div class="flow-stats-container">
<!-- 真流量 -->
<div v-if="canViewCurrentPackageRealUsage" class="flow-stat-section">
<div v-if="canShowCurrentPackageRealUsage" class="flow-stat-section">
<div class="flow-stat-label">真流量使用</div>
<div class="flow-stat-row">
<span class="stat-item">
@@ -303,13 +303,17 @@
const canViewCurrentPackageVirtualUsage = computed(() =>
hasAuth('asset_info:view_current_package_virtual_usage')
)
const canShowCurrentPackageRealUsage = computed(
() =>
canViewCurrentPackageRealUsage.value || props.currentPackage?.enable_virtual_data === false
)
const canShowCurrentPackageVirtualUsage = computed(
() =>
canViewCurrentPackageVirtualUsage.value && props.currentPackage?.enable_virtual_data !== false
)
const shouldShowTrafficCard = computed(() => {
if (!isAdminOrPlatform.value) return true
return canViewCurrentPackageRealUsage.value || canShowCurrentPackageVirtualUsage.value
return canShowCurrentPackageRealUsage.value || canShowCurrentPackageVirtualUsage.value
})
const descriptionsColumn = computed(() => {