diff --git a/src/apis/mock.js b/src/apis/mock.js index 6a36735..8311ff7 100644 --- a/src/apis/mock.js +++ b/src/apis/mock.js @@ -34,3 +34,23 @@ export const set_overtime_config = (params) => { params: req_params }) } + + +export const start_mock = (params,data) => { + console.log(params) + return request({ + url: 'api/start_mock', + method: 'post', + params: params, + data: data + }) +} + +export const end_mock = (params) => { + console.log(params) + return request({ + url: 'api/end_mock', + method: 'get', + params: params, + }) +} \ No newline at end of file diff --git a/src/request/config.js b/src/request/config.js index 1b26e40..e4ad649 100644 --- a/src/request/config.js +++ b/src/request/config.js @@ -1,5 +1,5 @@ export default { - method: 'get', + // method: 'get', baseURL: 'http://127.0.0.1:8000', headers: { 'Content-Type': 'application/json;charset=UTF-8', diff --git a/src/request/index.js b/src/request/index.js index d68b7ac..252aea0 100644 --- a/src/request/index.js +++ b/src/request/index.js @@ -5,10 +5,11 @@ import config from "@/request/config.js"; // import router from "@/router"; function request(options) { + console.log(options) const instance = axios.create({...config}) options = {...options, instance} // 使用创建的实例 - + console.log(options) // 请求拦截器 instance.interceptors.request.use( config => { diff --git a/src/views/mock/index.vue b/src/views/mock/index.vue index 54e0afd..89f6201 100644 --- a/src/views/mock/index.vue +++ b/src/views/mock/index.vue @@ -1,14 +1,14 @@