import request from "@/utils/request";

// 项目配置
export function config(data) {
  return request({
    url: "/admin/v1/config",
    method: "post",
    data,
  });
}
// 项目配置 添加
export function configAdd(data) {
  return request({
    url: "/admin/v1/config/add",
    method: "post",
    data,
  });
}
// 项目配置 修改
export function configEdit(data) {
  return request({
    url: "/admin/v1/config/edit",
    method: "post",
    data,
  });
}
// 租户列表 省市区选择
export function areaList(params) {
  return request({
    url: "/admin/v1/config/area",
    method: "get",
    params,
  });
}
// 省列表
export function provinceList() {
  return request({
    url: "/region/allProvince",
    method: "get",
  });
}

// 市列表
export function cityList(provinceCode) {
  return request({
    url: "/region/allCity",
    method: "get",
    params: {
      provinceCode,
    },
  });
}

// 县区列表
export function districtList(cityCode) {
  return request({
    url: "/region/allArea",
    method: "get",
    params: {
      cityCode,
    },
  });
}

// 身份
export function identity(params) {
  return request({
    url: "/admin/v1/config/identity",
    method: "get",
    params,
  });
}
// 领域
export function industry(params) {
  return request({
    url: "/admin/v1/config/industry",
    method: "get",
    params,
  });
}
