import fetch from '@/utils/fetch'

/**
 * 用户登录
 * @Author   Sophy
 * @DateTime 2019-08-26T10:07:00+0800
 */
export const login = ({ username, password }) => fetch('/admin/login', {
  username,
  password
}, 'POST')

/**
 * 退出登录
 * @Author   Sophy
 * @DateTime 2019-08-26T10:07:14+0800
 */
export const logout = () => fetch('/admin/logout', {}, 'POST')

/**
 * 获取用户信息
 */
export const getInfo = () => fetch('/user/info', {})
