mirror of
https://github.com/chansee97/nova-admin.git
synced 2025-04-05 19:41:59 +08:00
29 lines
538 B
TypeScript
29 lines
538 B
TypeScript
import { mock } from 'mockjs'
|
|
import { resultSuccess } from '../utils'
|
|
|
|
const userList = mock({
|
|
'list|20': [
|
|
{
|
|
'id': '@id',
|
|
'name': '@cname',
|
|
'age|20-36': 36,
|
|
'gender|1': ['0', '1', null],
|
|
'email': '@email("qq.com")',
|
|
'address': '@county(true)',
|
|
'role|1': ['super', 'admin', 'user'],
|
|
'disabled|1': true,
|
|
},
|
|
],
|
|
})
|
|
|
|
export default [
|
|
{
|
|
url: '/mock/userList',
|
|
timeout: 1000,
|
|
method: 'get',
|
|
response: () => {
|
|
return resultSuccess(userList.list)
|
|
},
|
|
},
|
|
]
|