2 changed files with 42 additions and 42 deletions
@ -1,20 +1,20 @@ |
|||||||
import request from "../util/request" |
import request from '../util/request' |
||||||
|
|
||||||
// 这个是使用方法封装的axios进行请求,并传递查询参数
|
// 这个是使用方法封装的axios进行请求,并传递查询参数
|
||||||
// 登录的接口
|
// 登录的接口
|
||||||
export const login = (staffNo: string)=>{ |
export const login = (staffNo: string) => { |
||||||
return request({ |
return request({ |
||||||
url:'login', |
url: 'login', |
||||||
method:'post', |
method: 'post', |
||||||
params: { |
params: { |
||||||
staffNo: staffNo |
staffNo: staffNo, |
||||||
} // 这里的 params 对象将被 axios 转换为查询字符串
|
}, // 这里的 params 对象将被 axios 转换为查询字符串
|
||||||
}) |
}) |
||||||
} |
} |
||||||
// 登出的接口
|
// 登出的接口
|
||||||
export const logout =()=>{ |
export const logout = () => { |
||||||
return request({ |
return request({ |
||||||
url:'logout', |
url: 'logout', |
||||||
method:'get' |
method: 'get', |
||||||
}) |
}) |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue