import { defHttp } from '/@/utils/http/axios';
import {
  PageParams,
  operateList,
  sceneMoveParams,
  sceneControlParams,
  RentListGetResultModel,
  checkDownLoadResult,
  sceneDownloadResult,
  ResultDetail,
  addCameraParams,
  updateParams,
  overallDelete,
} from './model';
import { Result } from '/#/axios';

enum Api {
  pageList = '/service/sale/news/pageNews',
  newDisplay = '/service/sale/news/display',
  newPutTop = '/service/sale/news/putTop',
  newUpdateNews = '/service/sale/news/updateNews',
  newAddNews = '/service/sale/news/addNews',
  newDelete = '/service/sale/news/delete',
  publicNews = '/service/sale/news/publicNews',
  newGetNewsDetail = '/service/sale/news/getNewsDetail',
  //招聘
  employNoteList = '/service/sale/employNote/list',
  addOrUpdate = '/service/sale/employNote/addOrUpdate',
  employNoteDelete = '/service/sale/employNote/delete',
  employNoteIsPush = '/service/sale/employNote/isPush',
  employNoteIsTop = '/service/sale/employNote/isTop',
  //留言
  intercomMessageList = '/service/sale/intercomMessage/list',
  intercomMessageHandle = '/service/sale/intercomMessage/handle',

  operateSceneList = '/service/agent/scene/list',
  sceneMove = '/service/agent/scene/move',
  sceneDelete = '/service/sale/scene/delete',
  qjsceneDelete = '/service/sale/overall/delete',
  sceneDownload = '/service/sale/scene/downScene',
  sceneCopy = '/service/agent/scene/copy',
  checkDownLoad = '/service/sale/scene/checkDownLoad',
  downloadProcess = '/service/sale/scene/downloadProcess',
  rebuildScene = '/service/sale/scene/rebuildScene',
  overallList = '/service/sale/overall/list',
  overallDelete = '/service/sale/overall/delete',
  agentAuditList = '/service/sale/agentAudit/list',
  agentAuditHandle = '/service/sale/agentAudit/handle',
  sceneApplyList = '/service/sale/sceneApply/list',
  sendEmail = '/service/sale/sceneApply/sendEmail',
  sceneApplyHandle = '/service/sale/sceneApply/handle',
  getInfoMail = '/service/sale/getInfo',
  updateMail = '/service/sale/update',
  caseaddOrUpdate='/service/sale/case/addOrUpdate',
  caseList = '/service/sale/case/list',
  caseDel='/service/sale/case/del',
  caseRelease='/service/sale/case/isShow',
  caseWithdraw='/service/sale/case/release',
}

/**
 * @description: Get sample list value
 */

 export const agentAuditList = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.agentAuditList,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 export const agentAuditHandle = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.agentAuditHandle,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 export const sendEmail = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.sendEmail,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 export const sceneApplyList = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.sceneApplyList,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 export const sceneApplyHandle = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.sceneApplyHandle,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 
 export const caseListApi = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.caseList,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 
 export const caseaddOrUpdateApi = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.caseaddOrUpdate,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
  
 export const casePublicApi = (params: PageParams) =>
 defHttp.get<RentListGetResultModel>({
   url: Api.caseWithdraw,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 export const caseReleaseApi = (params: PageParams) =>
 defHttp.get<RentListGetResultModel>({
   url: Api.caseRelease,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 export const caseDelApi = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.caseDel,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
 export const ListApi = (params: PageParams) =>
 defHttp.post<RentListGetResultModel>({
   url: Api.pageList,
   params: params,
   // data: params,
   headers: {
     // @ts-ignore
     ignoreCancelToken: true,
   },
 });
//显示隐藏
export const NewDisplay = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newDisplay,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/修改是否置顶
export const NewPutTop = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newPutTop,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
//新闻管理/获取新闻详情
export const NewsDetail = (params: PageParams) =>
  defHttp.post<ResultDetail>({
    url: Api.newGetNewsDetail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//邮件模板设置
export const getInfoMail = (params: PageParams) =>
  defHttp.get<ResultDetail>({
    url: Api.getInfoMail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//邮件模板设置
export const updateMail = (params: PageParams) =>
  defHttp.post<ResultDetail>({
    url: Api.updateMail,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
//新闻管理/修改是否发布
export const NewPublicNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.publicNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newAddNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newAddNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newUpdateNews = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newUpdateNews,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

//新闻管理/新增新闻
export const newDelete = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.newDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

export const operateSceneList = (params: operateList) =>
  defHttp.post<Result>({
    url: Api.operateSceneList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const overallList = (params: overallList) =>
  defHttp.post<Result>({
    url: Api.overallList,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const overallDelete = (params: overallList) =>
  defHttp.post<Result>({
    url: Api.overallDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneMove = (params: sceneMoveParams) =>
  defHttp.post<Result>({
    url: Api.sceneMove,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const rebuildScene = (params: sceneControlParams) =>
  defHttp.get<Result>({
    url: Api.rebuildScene,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneDelete = (params: sceneControlParams) =>
  defHttp.post<Result>({
    url: Api.sceneDelete,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
  
export const qjsceneDelete = (params: overallDelete) =>
defHttp.post<Result>({
  url: Api.qjsceneDelete,
  params: params,
  // data: params,
  headers: {
    // @ts-ignore
    ignoreCancelToken: true,
  },
});
export const checkDownLoad = (params: sceneControlParams) =>
  defHttp.get<checkDownLoadResult>({
    url: Api.checkDownLoad,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneDownload = (params: sceneControlParams) =>
  defHttp.get<sceneDownloadResult>({
    url: Api.sceneDownload,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const downloadProcess = (params: sceneControlParams) =>
  defHttp.get<sceneDownloadResult>({
    url: Api.downloadProcess,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
export const sceneCopy = (params: sceneControlParams) =>
  defHttp.post<Result>({
    url: Api.sceneCopy,
    params: params,
    // data: params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/列表
export const employNoteList = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/新增或修改
export const addOrUpdate = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.addOrUpdate,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });

// 招聘管理/删除
export const employNoteDelete = (params: PageParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteDelete,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/发布撤回
export const employNoteIsPush = (params: addCameraParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteIsPush,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 招聘管理/置顶撤回
export const employNoteIsTop = (params: addCameraParams) =>
  defHttp.post<RentListGetResultModel>({
    url: Api.employNoteIsTop,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 留言管理/列表
export const intercomMessageList = (params: updateParams) =>
  defHttp.post<Result>({
    url: Api.intercomMessageList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
// 留言管理/列表
export const intercomMessageHandle = (params: updateParams) =>
  defHttp.post<Result>({
    url: Api.intercomMessageHandle,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });