修复bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 11m14s

This commit is contained in:
sexygoat
2026-04-08 10:19:25 +08:00
parent ff087abd44
commit b510b4539f
55 changed files with 2274 additions and 2612 deletions

View File

@@ -34,6 +34,7 @@
import { PackageManageService } from '@/api/modules'
import type { PackageResponse } from '@/types/api'
import { formatDateTime } from '@/utils/business/format'
import { getStatusLabel, getShelfStatusText } from '@/config/constants'
defineOptions({ name: 'PackageDetail' })
@@ -55,7 +56,7 @@
{
label: '套餐类型',
formatter: (_, data) => {
const typeMap = {
const typeMap: Record<string, string> = {
formal: '正式套餐',
addon: '附加套餐'
}
@@ -72,7 +73,7 @@
label: '套餐周期类型',
formatter: (_, data) => {
if (!data.calendar_type) return '-'
const typeMap = {
const typeMap: Record<string, string> = {
natural_month: '自然月',
by_day: '按天'
}
@@ -90,7 +91,7 @@
label: '流量重置周期',
formatter: (_, data) => {
if (!data.data_reset_cycle) return '-'
const cycleMap = {
const cycleMap: Record<string, string> = {
daily: '每日',
monthly: '每月',
yearly: '每年',
@@ -109,13 +110,13 @@
{
label: '状态',
formatter: (_, data) => {
return data.status === 1 ? '启用' : '禁用'
return getStatusLabel(data.status ?? 0)
}
},
{
label: '上架状态',
formatter: (_, data) => {
return data.shelf_status === 1 ? '上架' : '下架'
return getShelfStatusText(data.shelf_status ?? 0)
}
},
{ label: '创建时间', prop: 'created_at', formatter: (value) => formatDateTime(value) },