diff --git a/src/pages/admin-users.tsx b/src/pages/admin-users.tsx index f2dccee..b28c7d7 100644 --- a/src/pages/admin-users.tsx +++ b/src/pages/admin-users.tsx @@ -17,10 +17,24 @@ import { import dayjs from 'dayjs'; import { useEffect, useRef, useState } from 'react'; import { type Content, JSONEditor, type OnChange } from 'vanilla-jsoneditor'; +import { quotas } from '@/constants/quotas'; import { adminApi } from '@/services/admin-api'; const { Title } = Typography; +const tierOptions = [ + { value: 'free', label: '免费版' }, + { value: 'standard', label: '标准版' }, + { value: 'premium', label: '高级版' }, + { value: 'pro', label: '专业版' }, + { value: 'vip1', label: '大客户VIP1版' }, + { value: 'vip2', label: '大客户VIP2版' }, + { value: 'vip3', label: '大客户VIP3版' }, + { value: 'custom', label: '定制版' }, +]; + +const tierLabelMap = new Map(tierOptions.map((option) => [option.value, option.label])); + // JSON Editor wrapper component for quota editing const JsonEditorWrapper = ({ value, @@ -188,7 +202,8 @@ export const Component = () => { title: '套餐', dataIndex: 'tier', key: 'tier', - width: 100, + width: 120, + render: (tier: string) => tierLabelMap.get(tier) || tier || '-', }, { title: '套餐过期时间', @@ -278,13 +293,9 @@ export const Component = () => {