const api = {
  login4dev: ($http) => {
    return $http.post(`${$servers.base}/login4dev`);
  },
  getById: ($http, id, showLoading = true) => {
    return $http.get(`${$servers.base}/design/getById/${id}`, showLoading);
  },
  updateById: ($http, data) => {
    return $http.post(
      `${$servers.base}/template/sysTemplate/update4DesignerV5`,
      data
    );
  },
  findAllDic: ($http) => {
    return $http.post(`${$servers.base}/parm/sysParmDic/findAllDic`);
  },
  getDicDataByKey: ($http, keyName) => {
    return $http.postForm(
      `${$servers.base}/parm/sysParmDic/getDicListByKeyFromCache`,
      { keyName }
    );
  },
  findTemplateByPagePop: ($http, data) => {
    return $http.post(`${$servers.base}/template/sysTemplate/findByPagePopV5`, data);
  },
  getDataDicArea4Cascader: ($http) => {
    return $http.post(
      `${$servers.base}/parm/sysParmDic/getDataDicArea4Cascader`,
      null,
      false
    );
  },
  getDataDicTrade4Cascader: ($http) => {
    return $http.post(
      `${$servers.base}/parm/sysParmDic/getDataDicTrade4Cascader`,
      null,
      false
    );
  },
  saveTemplateDialog: ($http, data) => {
    return $http.post(`${$servers.base}/template/sysTemplateDialog/save`, data);
  },
  getAllTemplateDialog: ($http) => {
    return $http.post(
      `${$servers.base}/template/sysTemplateDialog/getAllTemplate`,
      null,
      false
    );
  },
  deleteTemplateDialog: ($http, id) => {
    return $http.postForm(`${$servers.base}/template/sysTemplateDialog/deleteById`, {
      id
    });
  },
  getProductConfig: ($http) => {
    return $http.postForm(`${$servers.base}/design/getProductConfig`);
  },
  getModeNoList4Doc: ($http) => {
    return $http.post(`${$servers.base}/docFileModeConfig/findList`, null, false);
  },
  getModeNoList4Cont: ($http) => {
    return $http.post(`${$servers.base}/docCtrModeConfig/findList`, null, false);
  },
  findRiskSchByPopPage4Designer: ($http, data) => {
    return $http.post(`${$servers.comm}/riskSch/findRiskSchByPopPage4Designer`, data);
  }
};
export {
  api as default
};
