mock.js
2.16 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
const Mock = require('mockjs');
Mock.mock("/api/v1/financial/contracts/contract/project/acceptancs", 'post', res => {
console.log("project add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/project/acceptancs", 'put', res => {
console.log("project modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("http://192.168.9.162:20080/api/v1/financial/contracts", 'post', res => {
console.log("contract add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("http://192.168.9.162:20080/api/v1/financial/contracts", 'put', res => {
console.log("contract modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/payments", 'post', res => {
console.log("payment add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/payments", 'put', res => {
console.log("payment modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/delivers", 'post', res => {
console.log("delivers add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/delivers", 'put', res => {
console.log("delivers modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/receipts", 'post', res => {
console.log("receipts add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/receipts", 'put', res => {
console.log("receipts modify successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/rebacks", 'post', res => {
console.log("rebacks add successful");
console.log(res.body);
return {
encode: 200
}
})
Mock.mock("/api/v1/financial/contracts/contract/rebacks", 'put', res => {
console.log("rebacks modify successful");
console.log(res.body);
return {
encode: 200
}
})