feat: 对接用户列表字段数据
This commit is contained in:
@@ -0,0 +1,177 @@
|
||||
/**
|
||||
* 用户列表页假数据
|
||||
*
|
||||
* 使用页面:`src/pages/events/users/index.tsx`
|
||||
* 对应接口:`GET /manager/user/page`
|
||||
* 类型:`TournamentAdminUserPageVO[]`
|
||||
*
|
||||
* 注意:为避免循环引用(api/users/index.ts → 此文件 → api/users/types),
|
||||
* 此文件不 import 任何 api 层类型,接口定义内联。
|
||||
*/
|
||||
|
||||
interface MockUserVO {
|
||||
id: string;
|
||||
nickname: string;
|
||||
phone: string;
|
||||
realName: string;
|
||||
idCard: string;
|
||||
idCardImg: string;
|
||||
idCardImgList: string[];
|
||||
status: string;
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
interface MockPageData<T> {
|
||||
total: number;
|
||||
list: T[];
|
||||
}
|
||||
|
||||
export const MOCK_USER_LIST: 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',
|
||||
],
|
||||
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: [],
|
||||
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'],
|
||||
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: [],
|
||||
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',
|
||||
],
|
||||
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: [],
|
||||
status: '1',
|
||||
createTime: '2026-07-15 00:36:12',
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
nickname: '健身爱好者',
|
||||
phone: '13700137007',
|
||||
realName: '吴九',
|
||||
idCard: '320101199507077890',
|
||||
idCardImg: '',
|
||||
idCardImgList: [],
|
||||
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'],
|
||||
status: '1',
|
||||
createTime: '2026-07-13 07:10:38',
|
||||
},
|
||||
{
|
||||
id: '9',
|
||||
nickname: '羽毛球小将',
|
||||
phone: '13800138009',
|
||||
realName: '陈一',
|
||||
idCard: '320101199709099012',
|
||||
idCardImg: '',
|
||||
idCardImgList: [],
|
||||
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'],
|
||||
status: '0',
|
||||
createTime: '2026-07-11 13:44:04',
|
||||
},
|
||||
{
|
||||
id: '11',
|
||||
nickname: '健身爱好者',
|
||||
phone: '13700137011',
|
||||
realName: '黄三',
|
||||
idCard: '320101199911111234',
|
||||
idCardImg: '',
|
||||
idCardImgList: [],
|
||||
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',
|
||||
],
|
||||
status: '1',
|
||||
createTime: '2026-07-09 20:18:30',
|
||||
},
|
||||
];
|
||||
|
||||
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 };
|
||||
}
|
||||
Reference in New Issue
Block a user