import request from '@/utils/request'

export function loginByUsername(username, password,verifyCode) {
  const data = {
    username,
    password,
    verifyCode
  }
  return request({
    url: '/auth/login',
    method: 'post',
    data
  })
}

export function verifyCode() {
  return request({
    url: '/auth/verifyCode',
    method: 'get',
    responseType: 'blob',
  })
}

export function logout() {
  return request({
    url: '/auth/logout',
    method: 'post'
  })
}

export function getUserInfo() {
  return request({
    url: '/auth/info',
    method: 'get'
  })
}

