import request from '@/utils/request'
import axios from 'axios'
// 获取地区
export const getRegion = (params) => request.basic.get('/region', params)

// 获取 验证码ID
export const getCaptcha = (params) => request.basic.get('/api/v1/captcha/id', params)

// 获取图片
export const getCaptchaImage = (params) => request.basic.get('/api/v1/captcha/image', params , { responseType: 'blob' })

//上传图片
export const uploadImg=(params)=>request.basic.post('/api/v1/upload',params,{Headers:{'Authorization':'','Content-Type': 'multipart/form-data'}})
  // export const uploadImg=(params)=>axios.post('https://zh.shibeitong.com/api/v1/upload',params,{
  //   headers: {
  //     'Authorization':'',
  //     'Content-Type': 'multipart/form-data'
  //   },
  // })