修复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

@@ -0,0 +1,15 @@
/**
* 启用状态配置
* 用于一次性佣金、强充等功能的启用/未启用状态
*/
// 启用状态选项(用于搜索表单和下拉选择)
export const ENABLE_STATUS_OPTIONS = [
{ label: '已启用', value: true },
{ label: '未启用', value: false }
]
// 获取启用状态文本
export function getEnableStatusText(enabled: boolean): string {
return enabled ? '已启用' : '未启用'
}

View File

@@ -25,3 +25,9 @@ export * from './carrierTypes'
// 套餐管理相关
export * from './package'
// 角色类型相关
export * from './roleTypes'
// 启用状态相关
export * from './enableStatus'

View File

@@ -132,6 +132,14 @@ export const SHELF_STATUS_OPTIONS = [
}
]
/**
* 上架状态选项(精简版,用于搜索表单和下拉选择)
*/
export const SHELF_STATUS_SELECT_OPTIONS = [
{ label: '上架', value: ShelfStatus.ON_SHELF },
{ label: '下架', value: ShelfStatus.OFF_SHELF }
]
/**
* 上架状态映射
*/

View File

@@ -0,0 +1,25 @@
/**
* 角色类型配置
*/
import { RoleType } from '@/types/api'
// 角色类型选项
export const ROLE_TYPE_OPTIONS = [
{ label: '平台角色', value: RoleType.PLATFORM },
{ label: '客户角色', value: RoleType.CUSTOMER }
]
// 角色类型映射
export const ROLE_TYPE_MAP = ROLE_TYPE_OPTIONS.reduce(
(map, item) => {
map[item.value] = item
return map
},
{} as Record<RoleType, { label: string; value: RoleType }>
)
// 获取角色类型标签
export function getRoleTypeLabel(type: RoleType): string {
return ROLE_TYPE_MAP[type]?.label || '未知'
}