Update api.js
This commit is contained in:
parent
ca060f9f77
commit
119aa35393
|
@ -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退出登录
|
||||
//连续输入三次,需验证码校验
|
||||
|
|
Loading…
Reference in New Issue