refine code

This commit is contained in:
Pan
2017-08-22 15:09:25 +08:00
committed by 花裤衩
parent 62d2f62bff
commit b8ecda19d8
6 changed files with 11 additions and 17 deletions

View File

@@ -1,22 +1,22 @@
import fetch from 'utils/fetch';
import fetch from 'utils/fetch'
export function loginByUsername(username, password) {
const data = {
username,
password
};
}
return fetch({
url: '/login/login',
method: 'post',
data
});
})
}
export function logout() {
return fetch({
url: '/login/logout',
method: 'post'
});
})
}
export function getInfo(token) {
@@ -24,6 +24,6 @@ export function getInfo(token) {
url: '/user/info',
method: 'get',
params: { token }
});
})
}