1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-04-06 03:57:53 +08:00
2017-08-28 13:18:35 +08:00

30 lines
437 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 }
})
}