import request from '@/utils/request'

const userApi = {
  login: '/login',
  logout: '/logout',
  getLoginUser: '/getLoginUser'
}

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

export function getLoginUser (parameter) {
  return request({
    url: userApi.getLoginUser,
    method: 'post',
    data: parameter
  })
}

export function logout () {
  return request({
    url: userApi.logout,
    method: 'get'
  })
}
export function getSmsCaptcha (parameter) {
  return axios({
    url: '/getSmsCaptcha',
    method: 'get',
    params: parameter
  })
}
