fe-drone-ci/src/api/login.js

31 lines
449 B
JavaScript
Raw Normal View History

2017-04-24 06:15:42 +00:00
import { fetch } from 'utils/fetch';
export function loginByEmail(email, password) {
const data = {
email,
password
};
return fetch({
url: '/login/loginbyemail',
method: 'post',
params: data
});
}
export function logout() {
return fetch({
url: '/login/logout',
method: 'post'
});
}
export function getInfo(token) {
return fetch({
url: '/user/info',
method: 'get',
params: { token }
});
}