import request from '@/utils/request'
import tools from '@/utils/tool'
const userApi = {
  Login: '/account/login', // 验证登陆
  Logout: '/user/logout', // 退出登录
  UserInfo: '/user/UserInfo',
  UserMenu: '/user/nav'
}

/**
 * login func
 * parameter: {
 *     username: '',
 *     password: '',
 *     remember_me: true,
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
// 登录
export function login (parameter) {
  return request.post(userApi.Login, parameter)
  // return request({
  //   url: userApi.Login,
  //   method: 'post',
  //   data: parameter
  // })
}
// 退出登录
export function logout () {
  return request.post(userApi.Logout)
}
//菜单
export function UserInfo () {
  return request.get(userApi.UserInfo)
}
