import request from '@/utils/request'

const MODULE_NAME = "/user/"

function getUserUrl(params) {
  return MODULE_NAME + params.function
}

export function login(data) {
  return request({
    url: getUserUrl({ function: 'login' }),
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
}
