diff --git a/src/assets/api.js b/src/assets/api.js index 6273c7d6..7c9ac27d 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -54,6 +54,18 @@ const req = (method, url, params, responseType) => { } } } + if(method == "login") + { + obj = { + method: method, + body: JSON.stringify(params), + headers: new Headers({ + 'Content-Type': 'application/json', + }) + } + + } + if (method == "post" || method == "put" || method == "delete") { obj = { method: method, @@ -482,7 +494,7 @@ export const postThemecustom= (data) => { //登录 export const postLogin = (data) => { - return req('post', baseurl + "/auth/login", data) + return req('login', baseurl + "/auth/login", data) } // logout退出登录 //连续输入三次,需验证码校验