import request from '@/utils/request'

//获取地址
export function upaddress(params) {
  return request({
    url: '/agent/area/get',
    method: 'get',
    params
  })
}

//申请区域代理
export function addretail(data) {
  return request({
    url: '/agent/area/post',
    method: 'post',
    data
  })
}
//申请分销代理
export function addretailfx(data) {
  return request({
    url: '/agent/retail/post',
    method: 'post',
    data
  })
}
//申请招商代理
export function addinvite(data) {
  return request({
    url: '/agent/invite/post',
    method: 'post',
    data
  })
}
//检测是否已有代理
export function checkagent(params) {
  return request({
    url: '/agent/check',
    method: 'get',
    params
  })
}

//获取代理协议接口
export function getagreement(params) {
  return request({
    url: '/agent/agreement',
    method: 'get',
    params
  })
}

//获取级别

export function getaglevel(params) {
  return request({
    url: '/agent/level/all',
    method: 'get',
    params
  })
}