import request from './request'

/*
* 获取区域信息
* */
export const getChinaArea = () => request({
  method: 'GET',
  url: '/area'
})

/*
* 获取网点列表
* */
export const getBankList = (id) => request({
  method: 'GET',
  url: '/home/bank/bankList',
  params: {
    id
  }
})

/*
* 短信发送
* */
export const sendSMS = (cellphone, type = 0, captcha) => request({
  method: 'GET',
  url: '/sendMsg',
  params: {
    cellphone,
    type,
    captcha
  }
})

/*
* 文件上传
* */
export const uploadFile = (formData) => request({
  headers: {
    'Content-Type': 'multipart/form-data'
  },
  method: 'POST',
  url: '/upload',
  data: formData
})

/*
* 获取产品信息
* */
export const getProductDetail = (id) => request({
  method: 'GET',
  url: '/home/product/detail',
  params: {
    id
  }
})
