添加链接管理功能,包括路由配置、权限设置和在管理布局中显示链接管理菜单项

This commit is contained in:
zyh
2025-08-26 10:47:31 +08:00
parent da1ac4ddcf
commit 7a75fbe887
8 changed files with 876 additions and 1 deletions

56
src/config/links.js Normal file
View File

@@ -0,0 +1,56 @@
// 链接管理配置文件
// 链接地址生成规则
export const LINK_CONFIG = {
// 基础域名
BASE_URL: 'https://yourdomain.com',
// 游戏页面路径
GAME_PATH: '/play',
// 机器编号参数名
CODE_PARAM: 'code',
// 链接地址模板
getLinkUrl: (codeNo) => {
return `${LINK_CONFIG.BASE_URL}${LINK_CONFIG.GAME_PATH}?${LINK_CONFIG.CODE_PARAM}=${codeNo}`
}
}
// 状态配置
export const STATUS_CONFIG = {
// 状态标签类型
LABEL_TYPES: {
NORMAL: 'success', // 正常
EXPIRING: 'warning', // 即将过期
EXPIRED: 'danger', // 已过期
UNKNOWN: 'info' // 未知
},
// 状态文本
LABEL_TEXTS: {
NORMAL: '正常',
EXPIRING: '即将过期',
EXPIRED: '已过期',
UNKNOWN: '未知'
},
// 过期时间阈值(毫秒)
EXPIRING_THRESHOLD: 24 * 60 * 60 * 1000, // 24小时
}
// 导出配置
export const EXPORT_CONFIG = {
// CSV文件前缀
FILE_PREFIX: 'links',
// 默认列配置
DEFAULT_COLUMNS: [
{ key: 'batchId', label: '批次ID' },
{ key: 'codeNos', label: '机器编号' },
{ key: 'deductPoints', label: '扣除积分' },
{ key: 'expireAt', label: '过期时间' },
{ key: 'status', label: '状态' },
{ key: 'createdAt', label: '创建时间' }
]
}