import request from '@/utils/request'
import {smart} from './commonApi'

export function login(params) {
  return request({
    url: smart + `/user-info/login`,
    method: 'post',
    params
  })
}

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

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
export function captcha() {
  return request({
    url: smart + `/user-info/identifyImage`,
    method: 'get',
    responseType: 'blob',
  })
}
