import request from '@/utils/request';
// 查询购买者列表分页

export function doGetBuyer(data) {
  return request({
    url: '/admin/buyer/account/page',
    method: 'post',
    data
  });
}

// 添加-编辑
export function doEditBuyer(data) {
  return request({
    url: '/admin/buyer/account/add',
    method: 'post',
    data
  });
}
// 删除
// export function doDeleteBuyer(id) {
//   return request({
//     url: "/admin/auth/doDeleteAdmin",
//     method: "delete",
//     params: {
//       id: id,
//     },
//   });
// }
export function doDeleteBuyer(id) {
  return request({
    url: `/admin/buyer/account/del/${id}`,
    method: 'get'
  });
}

// 获得省份列表
export function getProvince() {
  return request({
    url: '/admin/areaCode/getProvince',
    method: 'get',
    params: {}
  });
}

// 获得城市列表
export function getCity(areaCodeId) {
  return request({
    url: '/admin/areaCode/getCity',
    method: 'get',
    params: areaCodeId
  });
}

// 获得区县列表
export function getArea(areaCodeId) {
  return request({
    url: '/admin/areaCode/getArea',
    method: 'get',
    params: areaCodeId
  });
}
