82 lines
1.5 KiB
TypeScript
82 lines
1.5 KiB
TypeScript
import sheet from './sheet.json';
|
|
import sheetlist from './sheetlist.json';
|
|
|
|
const users = [
|
|
{ id: 0, name: 'Umi', nickName: 'U', gender: 'MALE' },
|
|
{ id: 1, name: 'Fish', nickName: 'B', gender: 'FEMALE' },
|
|
];
|
|
|
|
const api = {
|
|
'GET /admin/stats': {
|
|
success: true,
|
|
data: {
|
|
notInOreo: 114,
|
|
total: 514,
|
|
},
|
|
},
|
|
'POST /admin/sheet/update': {
|
|
success: true,
|
|
data: {},
|
|
},
|
|
'POST /admin/sheet/create': {
|
|
success: true,
|
|
data: {},
|
|
},
|
|
'GET /admin/sheet/current': {
|
|
success: true,
|
|
data: sheet,
|
|
},
|
|
'GET /admin/sheet/list': {
|
|
success: true,
|
|
data: sheetlist,
|
|
},
|
|
'GET /admin/duty/current': {
|
|
success: true,
|
|
data: {
|
|
isInDuty: true,
|
|
currentDuty: '2',
|
|
inDutyCnt: 3,
|
|
otherDutyTime: '',
|
|
offDutyReason: '',
|
|
place: '204',
|
|
dutyRecoverTime: '',
|
|
},
|
|
},
|
|
'POST /admin/duty/update': {
|
|
success: true,
|
|
data: {},
|
|
},
|
|
'GET /admin/loglist': {
|
|
success: true,
|
|
data: {
|
|
op: '宇航员',
|
|
time: '2024-03-07T19:52:48.523303',
|
|
operation: 2,
|
|
target: 1,
|
|
prev: {
|
|
id: 114,
|
|
info: '马嘉祺',
|
|
},
|
|
curr: {
|
|
id: 514,
|
|
info: '何君琳',
|
|
},
|
|
},
|
|
},
|
|
'GET /api/v1/queryUserList': (req: any, res: any) => {
|
|
res.json({
|
|
success: true,
|
|
data: { list: users },
|
|
errorCode: 0,
|
|
});
|
|
},
|
|
'PUT /api/v1/user/': (req: any, res: any) => {
|
|
res.json({
|
|
success: true,
|
|
errorCode: 0,
|
|
});
|
|
},
|
|
};
|
|
|
|
export default api;
|