import request from '@/utils/request' // 组件内部封装的axios

const baseURL = `${process.env.VUE_APP_BASE_API}/captcha`

// 获取验证图片  以及token
export function reqGet(data) {
  return request({
    url: `${baseURL}/get`,
    method: 'post',
    headers: {
      'X-Requested-With': 'XMLHttpRequest',
    },
    data
  })
}

// 滑动或者点选验证
export function reqCheck(data) {
  return request({
    url: `${baseURL}/check`,
    method: 'post',
    headers: {
      'X-Requested-With': 'XMLHttpRequest',
    },
    data
  })
}