feat: 对接用户管理相关接口字段

This commit is contained in:
ZhuRui
2026-07-30 15:43:24 +08:00
parent 14f6af35d8
commit 7276425abf
18 changed files with 1225 additions and 821 deletions
+169
View File
@@ -0,0 +1,169 @@
/**
* Banner 列表页假数据
*
* 使用页面:`src/pages/events/banner/index.tsx`
* 对应接口:`GET /manager/banner/list`
* 类型:`TournamentAdminBannerListVO[]`
*
* 注意:类型内联定义,避免循环引用。
*/
export interface MockBannerVO {
id: string;
img: string;
title: string;
type: string;
linkUrl: string;
area: string;
showTimeBegin: string;
showTimeEnd: string;
status: string;
createTime: string;
}
export const MOCK_BANNER_LIST: MockBannerVO[] = [
{
id: '1',
img: 'https://picsum.photos/seed/banner1/80/44',
title: '2026全国青少年羽毛球锦标赛火热报名中',
type: '1',
linkUrl: '',
area: '广东省深圳市',
showTimeBegin: '2026-08-01 00:00',
showTimeEnd: '2026-08-31 23:59',
status: '1',
createTime: '2026-07-20 08:00:00',
},
{
id: '2',
img: 'https://picsum.photos/seed/banner2/80/44',
title: '马拉松城市联赛限时优惠',
type: '2',
linkUrl: 'https://example.com/marathon',
area: '浙江省杭州市',
showTimeBegin: '2026-08-15 00:00',
showTimeEnd: '2026-09-15 23:59',
status: '1',
createTime: '2026-07-19 11:30:00',
},
{
id: '3',
img: 'https://picsum.photos/seed/banner3/80/44',
title: '健身运动会专属福利',
type: '1',
linkUrl: '',
area: '北京市',
showTimeBegin: '2026-07-01 00:00',
showTimeEnd: '2026-07-30 23:59',
status: '1',
createTime: '2026-07-18 14:20:00',
},
{
id: '4',
img: 'https://picsum.photos/seed/banner4/80/44',
title: '平台品牌宣传活动',
type: '2',
linkUrl: 'https://example.com/promo',
area: '上海市',
showTimeBegin: '2026-06-01 00:00',
showTimeEnd: '2026-06-30 23:59',
status: '0',
createTime: '2026-07-17 18:05:00',
},
{
id: '5',
img: 'https://picsum.photos/seed/banner5/80/44',
title: '2026全国青少年羽毛球锦标赛火热报名中',
type: '1',
linkUrl: '',
area: '广东省深圳市',
showTimeBegin: '2026-09-01 00:00',
showTimeEnd: '2026-09-30 23:59',
status: '1',
createTime: '2026-07-16 21:15:00',
},
{
id: '6',
img: 'https://picsum.photos/seed/banner6/80/44',
title: '马拉松城市联赛限时优惠',
type: '3',
linkUrl: '/pages/activity/detail',
area: '浙江省杭州市',
showTimeBegin: '2026-10-01 00:00',
showTimeEnd: '2026-10-31 23:59',
status: '1',
createTime: '2026-07-15 00:30:00',
},
{
id: '7',
img: 'https://picsum.photos/seed/banner7/80/44',
title: '全民健身日特别活动',
type: '1',
linkUrl: '',
area: '北京市',
showTimeBegin: '2026-08-08 00:00',
showTimeEnd: '2026-08-08 23:59',
status: '1',
createTime: '2026-07-14 03:50:00',
},
{
id: '8',
img: 'https://picsum.photos/seed/banner8/80/44',
title: '新春运动季大促销',
type: '2',
linkUrl: 'https://example.com/spring',
area: '上海市',
showTimeBegin: '2026-01-15 00:00',
showTimeEnd: '2026-02-15 23:59',
status: '0',
createTime: '2026-07-13 07:05:00',
},
{
id: '9',
img: 'https://picsum.photos/seed/banner9/80/44',
title: '2026全国青少年羽毛球锦标赛火热报名中',
type: '1',
linkUrl: '',
area: '广东省深圳市',
showTimeBegin: '2026-08-01 00:00',
showTimeEnd: '2026-08-31 23:59',
status: '1',
createTime: '2026-07-12 10:25:00',
},
{
id: '10',
img: 'https://picsum.photos/seed/banner10/80/44',
title: '平台品牌宣传活动',
type: '2',
linkUrl: 'https://example.com/brand',
area: '浙江省杭州市',
showTimeBegin: '2026-11-01 00:00',
showTimeEnd: '2026-11-30 23:59',
status: '1',
createTime: '2026-07-11 13:40:00',
},
{
id: '11',
img: 'https://picsum.photos/seed/banner11/80/44',
title: '秋季健身挑战赛',
type: '1',
linkUrl: '',
area: '北京市',
showTimeBegin: '2026-09-01 00:00',
showTimeEnd: '2026-09-30 23:59',
status: '1',
createTime: '2026-07-10 17:00:00',
},
{
id: '12',
img: 'https://picsum.photos/seed/banner12/80/44',
title: '双十一运动装备大促',
type: '2',
linkUrl: 'https://example.com/double11',
area: '上海市',
showTimeBegin: '2026-11-01 00:00',
showTimeEnd: '2026-11-11 23:59',
status: '1',
createTime: '2026-07-09 20:15:00',
},
];
+181
View File
@@ -0,0 +1,181 @@
/**
* 操作日志页假数据
* 类型内联定义,避免循环引用。
*/
interface MockLogVO {
opName: string;
source: string;
nickname: string;
phone: string;
tournamentName: string;
obj: string;
createDate: string;
/** 操作内容详情(mock 扩展字段,API 暂无) */
content?: string;
}
const MOCK_LOGS: MockLogVO[] = [
{
opName: '删除赛事',
source: '2',
nickname: '张三',
phone: '12345678989',
tournamentName: '第二十一届风林杯羽毛球大赛',
obj: '第二十一届风林杯羽毛球大赛',
createDate: '2026-05-26 08:00:00',
content: '删除赛事',
},
{
opName: '取消报名',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '张三',
createDate: '2026-05-27 10:12:00',
content: '选手"张三"取消报名',
},
{
opName: '编辑选手',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '李四',
createDate: '2026-05-27 10:30:00',
content: '修改姓名,修改前:李四,修改后:张三',
},
{
opName: '编辑选手',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '李四',
createDate: '2026-05-27 10:35:00',
content:
'修改手机号,修改前:1234567899,修改后:13425678997;修改组别,修改前:男子单打,修改后:男子双打',
},
{
opName: '批量生成对阵',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A,男子小组B,男子小组C',
createDate: '2026-05-27 11:00:00',
content: '生成对阵',
},
{
opName: '生成对阵',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A',
createDate: '2026-05-27 11:05:00',
content: '生成对阵',
},
{
opName: '批量删除对阵',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A,男子小组B,男子小组C',
createDate: '2026-05-27 11:10:00',
content: '删除对阵',
},
{
opName: '删除对阵',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A',
createDate: '2026-05-27 11:15:00',
content: '删除对阵',
},
{
opName: '修改比分',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A,张三李四,第一局',
createDate: '2026-05-27 12:00:00',
content: '修改前:比分"21:0",修改后:"0:21"',
},
{
opName: '弃权',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子淘汰1,第一轮,张三李四',
createDate: '2026-05-27 13:00:00',
content: '选手"张三"弃权',
},
{
opName: '弃权',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A,张三李四',
createDate: '2026-05-27 13:10:00',
content: '双方弃权,选手"张三"、"李四"',
},
{
opName: '修改对阵',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A,张三李四,1',
createDate: '2026-05-27 14:00:00',
content: '修改前:比分"21:10",修改后:比分"21:0"',
},
{
opName: '修改对阵',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '男子小组A,张三李四,双打名额,选手 场地名额',
createDate: '2026-05-27 14:30:00',
content:
'修改前:比分"21:0",对局状态已完成,对阵时间:08:50-09:00,场地号:羽1,修改后:比分"0:0",对局状态为未开始,对阵时间:08:50-09:00,场地号:羽2',
},
{
opName: '修改场地',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '羽1',
createDate: '2026-05-27 15:00:00',
content: '修改前:羽1,修改后:羽3',
},
{
opName: '修改种子',
source: '1',
nickname: '',
phone: '',
tournamentName: '',
obj: '张某某,张三 场地名额',
createDate: '2026-05-27 15:30:00',
content: '修改前:1号种子,修改后:2号种子',
},
];
interface MockPageData<T> {
total: number;
list: T[];
}
export function buildMockOperationLogPage(page: number, limit: number): MockPageData<MockLogVO> {
const start = (page - 1) * limit;
return { total: MOCK_LOGS.length, list: MOCK_LOGS.slice(start, start + limit) };
}
+43 -86
View File
@@ -1,170 +1,128 @@
/**
* 用户列表页假数据
*
* 使用页面:`src/pages/events/users/index.tsx`
* 对应接口:`GET /manager/user/page`
* 类型:`TournamentAdminUserPageVO[]`
*
* 注意:为避免循环引用(api/users/index.ts → 此文件 → api/users/types),
* 此文件不 import 任何 api 层类型,接口定义内联。
* 用户列表页假数据(类型内联,避免循环引用)
* 对应接口:GET /sys/user/page
*/
interface MockUserVO {
id: string;
nickname: string;
phone: string;
realName: string;
idCard: string;
idCardImg: string;
idCardImgList: string[];
phone: string;
roleId: string;
roleName: string;
status: string;
createTime: string;
}
interface MockPageData<T> {
total: number;
list: T[];
}
export const MOCK_USER_LIST: MockUserVO[] = [
const MOCK_USERS: MockUserVO[] = [
{
id: '1',
nickname: '羽毛球小将',
phone: '13800138001',
realName: '张三',
idCard: '320101199001011234',
idCardImg: '',
idCardImgList: [
'https://picsum.photos/seed/uid1a/96/64',
'https://picsum.photos/seed/uid1b/96/64',
],
phone: '13800138001',
roleId: '1',
roleName: '超级管理员',
status: '1',
createTime: '2026-07-20 08:11:07',
},
{
id: '2',
nickname: '马拉松达人',
phone: '13900139002',
realName: '李四',
idCard: '320101199002022345',
idCardImg: 'https://picsum.photos/seed/uid2/96/64',
idCardImgList: [],
phone: '13900139002',
roleId: '2',
roleName: '赛事管理员',
status: '1',
createTime: '2026-07-19 11:28:20',
},
{
id: '3',
nickname: '健身爱好者',
phone: '13700137003',
realName: '王五',
idCard: '320101199103033456',
idCardImg: '',
idCardImgList: ['https://picsum.photos/seed/uid3a/96/64'],
phone: '13700137003',
roleId: '3',
roleName: '裁判',
status: '1',
createTime: '2026-07-18 14:45:33',
},
{
id: '4',
nickname: '游泳健将',
phone: '13600136004',
realName: '赵六',
idCard: '320101199204044567',
idCardImg: 'https://picsum.photos/seed/uid4/96/64',
idCardImgList: [],
phone: '13600136004',
roleId: '2',
roleName: '赛事管理员',
status: '0',
createTime: '2026-07-17 18:02:46',
},
{
id: '5',
nickname: '羽毛球小将',
phone: '13800138005',
realName: '孙七',
idCard: '320101199305055678',
idCardImg: '',
idCardImgList: [
'https://picsum.photos/seed/uid5a/96/64',
'https://picsum.photos/seed/uid5b/96/64',
],
phone: '13800138005',
roleId: '1',
roleName: '超级管理员',
status: '1',
createTime: '2026-07-16 21:19:59',
},
{
id: '6',
nickname: '马拉松达人',
phone: '13900139006',
realName: '周八',
idCard: '320101199406066789',
idCardImg: 'https://picsum.photos/seed/uid6/96/64',
idCardImgList: [],
phone: '13900139006',
roleId: '3',
roleName: '裁判',
status: '1',
createTime: '2026-07-15 00:36:12',
},
{
id: '7',
nickname: '健身爱好者',
phone: '13700137007',
realName: '吴九',
idCard: '320101199507077890',
idCardImg: '',
idCardImgList: [],
phone: '13700137007',
roleId: '2',
roleName: '赛事管理员',
status: '1',
createTime: '2026-07-14 03:53:25',
},
{
id: '8',
nickname: '游泳健将',
phone: '13600136008',
realName: '郑十',
idCard: '320101199608088901',
idCardImg: 'https://picsum.photos/seed/uid8/96/64',
idCardImgList: ['https://picsum.photos/seed/uid8a/96/64'],
phone: '13600136008',
roleId: '4',
roleName: '财务',
status: '1',
createTime: '2026-07-13 07:10:38',
},
{
id: '9',
nickname: '羽毛球小将',
phone: '13800138009',
realName: '陈一',
idCard: '320101199709099012',
idCardImg: '',
idCardImgList: [],
phone: '13800138009',
roleId: '3',
roleName: '裁判',
status: '1',
createTime: '2026-07-12 10:27:51',
},
{
id: '10',
nickname: '马拉松达人',
phone: '13900139010',
realName: '刘二',
idCard: '320101199810100123',
idCardImg: 'https://picsum.photos/seed/uid10/96/64',
idCardImgList: ['https://picsum.photos/seed/uid10a/96/64'],
phone: '13900139010',
roleId: '2',
roleName: '赛事管理员',
status: '0',
createTime: '2026-07-11 13:44:04',
},
{
id: '11',
nickname: '健身爱好者',
phone: '13700137011',
realName: '黄三',
idCard: '320101199911111234',
idCardImg: '',
idCardImgList: [],
phone: '13700137011',
roleId: '1',
roleName: '超级管理员',
status: '1',
createTime: '2026-07-10 17:01:17',
},
{
id: '12',
nickname: '游泳健将',
phone: '13600136012',
realName: '林四',
idCard: '320101200012122345',
idCardImg: '',
idCardImgList: [
'https://picsum.photos/seed/uid12a/96/64',
'https://picsum.photos/seed/uid12b/96/64',
],
phone: '13600136012',
roleId: '4',
roleName: '财务',
status: '1',
createTime: '2026-07-09 20:18:30',
},
@@ -172,6 +130,5 @@ export const MOCK_USER_LIST: MockUserVO[] = [
export function buildMockUserListPage(page: number, limit: number): MockPageData<MockUserVO> {
const start = (page - 1) * limit;
const list = MOCK_USER_LIST.slice(start, start + limit);
return { total: MOCK_USER_LIST.length, list };
return { total: MOCK_USERS.length, list: MOCK_USERS.slice(start, start + limit) };
}