forked from mqyqingfeng/react-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mockConfig.js
49 lines (46 loc) · 1.02 KB
/
mockConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
"use strict";
/**
* 接口配置文档
* 一个接口需要配置
* name 接口的名字
* type 接口的请求类型
* url 接口的地址
* response 接口的返回数据 为数组,每一个是接口可能返回的数据
* position 指定接口返回的的数据,是response的索引
*/
let mockConfig = [
{
"name": "login",
"type": "post",
"url": "/api/login",
"response": [
{
status: 200,
data: {
username: 'qwer',
password: 'asdfg'
}
},
{
status: 300,
message: '请重试',
data: null
}
],
"position": 0
},
{
"name": "login2",
"type": "get",
"url": "/api/desc",
"response": [{
status: 200,
data: {
username: 'qwer发发发ßß',
password: 'asdfg'
}
}],
"position": 0
},
];
exports.mockConfig = mockConfig;