admin-fe/src/api/login.js
2017-08-28 13:18:35 +08:00

29 lines
439 B
JavaScript

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 getUserInfo(token) {
return fetch({
url: '/user/info',
method: 'get',
params: { token }
})
}