feat(projects): 引入mockjs

This commit is contained in:
Soybean
2021-12-25 01:23:44 +08:00
parent c9c5ca9989
commit 9bc682dae8
18 changed files with 363 additions and 83 deletions

16
mock/api/auth.ts Normal file
View File

@ -0,0 +1,16 @@
import type { MockMethod } from 'vite-plugin-mock';
import type { BackendServiceResult } from '@/interface';
export default [
{
url: '/api/getUser',
method: 'get',
response: (): BackendServiceResult => {
return {
code: 200,
message: 'ok',
data: '测试mock数据'
};
}
}
] as MockMethod[];