48 lines
934 B
JavaScript
48 lines
934 B
JavaScript
/*
|
|
* @Descripttion:
|
|
* @version:
|
|
* @Date: 2021-04-20 11:06:21
|
|
* @LastEditors: huzhushan@126.com
|
|
* @LastEditTime: 2021-04-21 09:39:02
|
|
* @Author: huzhushan@126.com
|
|
* @HomePage: https://huzhushan.gitee.io/vue3-element-admin
|
|
* @Github: https://github.com/huzhushan/vue3-element-admin
|
|
* @Donate: https://huzhushan.gitee.io/vue3-element-admin/donate/
|
|
*/
|
|
export default [
|
|
{
|
|
url: '/api/get', // 请求地址
|
|
method: 'get', // 请求方法
|
|
response: ({ query }) => {
|
|
// 响应内容
|
|
return {
|
|
code: 0,
|
|
data: {
|
|
name: 'hello world',
|
|
},
|
|
}
|
|
},
|
|
},
|
|
{
|
|
url: '/api/post',
|
|
method: 'post',
|
|
timeout: 2000,
|
|
response: {
|
|
code: 0,
|
|
data: {
|
|
name: 'hello world',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
url: '/api/500',
|
|
method: 'get',
|
|
statusCode: 500,
|
|
response: {
|
|
code: 500,
|
|
message: '内部错误',
|
|
data: null,
|
|
},
|
|
},
|
|
]
|