wip: add account management page

This commit is contained in:
Vben
2021-03-01 00:56:25 +08:00
parent c8e84dc14e
commit 37669d067c
23 changed files with 372 additions and 16 deletions

30
mock/demo/system.ts Normal file
View File

@@ -0,0 +1,30 @@
import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess } from '../_util';
const list = (() => {
const result: any[] = [];
for (let index = 0; index < 20; index++) {
result.push({
id: `${index}`,
account: '@first',
email: '@email',
nickname: '@cname()',
role: '@first',
updateTime: '@datetime',
remark: '@cword(0,20)',
});
}
return result;
})();
export default [
{
url: '/api/system/getAccountList',
timeout: 100,
method: 'get',
response: ({ query }) => {
const { page = 1, pageSize = 20 } = query;
return resultPageSuccess(page, pageSize, list);
},
},
] as MockMethod[];