import { request } from '../../boot/axios';

class DataFun {
  getPage = (val?: Common.iPage) => {
    return request.post('dateModule/page', val);
  };
  getPageV = (val?: Common.iPage) => {
    return request.post('dateModuleMethod/page', val);
  };
  add = (val?: Data.newFormData) => {
    return request.post('dateModule/add/', val);
  };
  addV = (val?: Data.newFormDataV) => {
    return request.post('dateModuleMethod/add/', val);
  };
  edit = (val?: Data.newFormData) => {
    return request.put('dateModule/update/', val);
  };
  editV = (val?: Data.newFormDataV) => {
    return request.put('dateModuleMethod/update/', val);
  };
  del = (val?: any) => {
    return request.delete('dateModule/del/' + val);
  };
  delV = (val?: any) => {
    return request.delete('dateModuleMethod/del/' + val);
  };
  listMapper = (val?: any) => {
    return request.get('dateModule/listMapper/' + val);
  };
  listMapperV = (val?: any, val2?: any) => {
    return request.get('dateModuleMethod/listMapperMethod/' + val + '/' + val2);
  };
}
const dataFun = new DataFun();
export { dataFun };
