Update api.js

This commit is contained in:
姜棚 2021-11-28 10:56:42 +08:00
parent ca060f9f77
commit 119aa35393
1 changed files with 13 additions and 1 deletions

View File

@ -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退出登录
//连续输入三次,需验证码校验