This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user