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