fix: 真流量虚流量权限
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m42s

This commit is contained in:
sexygoat
2026-05-14 10:52:11 +08:00
parent 1690252740
commit 38cf7d12e9
29 changed files with 859 additions and 198 deletions

View File

@@ -196,6 +196,15 @@ export function useAssetFormatters() {
return statusMap[status] || 'info'
}
// 鑾峰彇鍒版湡璁℃椂鍩哄噯鏂囨
const getExpiryBaseLabel = (expiryBase?: string | null) => {
const map: Record<string, string> = {
from_activation: '实名激活时起算',
from_purchase: '购买时起算'
}
return map[expiryBase || ''] || '--'
}
// 计算使用进度百分比
const getUsageProgress = (cumulative: number, total: number): number => {
if (!total || total <= 0) return 0
@@ -255,6 +264,7 @@ export function useAssetFormatters() {
getSwitchModeName,
getTransactionTypeTag,
getPaymentStatusType,
getExpiryBaseLabel,
getUsageProgress,
getProgressColorByPercentage,
formatProgressPercentage,