import request from '@/utils/request'
// 登录

export const checkCode = params => {
  return request({
    url: '/point-strategy/v/user/checkCode',
    method: 'get',
    params
  })
}
export const checkCode2 = params => {
  return request({
    url: '/point-strategy/v/user/checkCode2',
    method: 'get',
    responseType: "blob",
    params
  })
}

export const checkCode3 = params => {
  return request({
    url: '/point-strategy/v/user/checkCode3',
    method: 'get',
    params
  })
}

export const checkCodeImage = params => {
  return request({
    url: '/point-strategy/v/user/checkCodeImage',
    method: 'get',
    params
  })
}
export const login = data => {
  return request({
    // url: '/point-strategy/v/user/login',
    url: '/point-strategy/login',
    method: 'post',
    data
  })
}
export const statAuditNum = params => {
  return request({
    url: '/point-strategy/v/approveApply/statAuditNum',
    method: 'post',
    params
  })
}
// 注册
export const registerUser = data => {
  return request({
    url: '/point-strategy/v/user/registerUser',
    method: 'post',
    data
  })
}

// 获取默认配置

export const getconfig = params => {
  return request({
    url: '/point-strategy/config/getConfig',
    method: 'get',
    params
  })
}

// 修改配置
export const updateConfig = data => {
  return request({
    url: '/point-strategy/config/updateConfig',
    method: 'post',
    data
  })
}

// 修改配置
export const uploadBackgroundImage = data => {
  return request({
    url: '/point-strategy/config/uploadBackgroundImage',
    method: 'post',
    data,
  })
}

