123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import { defHttp } from '/@/utils/http/axios';
- enum Api {
- list = '/app/appSitePlace/queryUnfixedPageList',
- save = '/app/appSitePlace/savePack',
- edit = '/app/appSitePlace/editPack',
- deleteOne = '/app/appSitePlace/deleteUnfixed',
- detaile = '/app/appCourese/queryById',
- queryById = '/app/appSitePlace/queryPack',
- Business = '/app/appSitePlace/queryByOrgCode',
- getProject = '/app/appCategory/queryCategories',
- }
- export const list = (params) => defHttp.get({ url: Api.list, params });
- /**
- * 删除单个
- */
- export const deleteOne = (params, handleSuccess) => {
- return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
- handleSuccess();
- });
- };
- /**
- * 保存或者更新
- * @param params
- */
- export const saveOrUpdate = (params, isUpdate) => {
- let url = isUpdate ? Api.edit : Api.save;
- return defHttp.post({ url: url, params });
- };
- export const getDetaile = (params) => {
- return defHttp.get({ url: Api.detaile, params });
- };
- export const queryById = (params) => {
- return defHttp.get({ url: Api.queryById, params });
- };
- /**
- * 营业名称
- * @param params type:0是学校,1是体育馆,不传查全部
- * @returns
- */
- export const Business = (params) => {
- return defHttp.post({ url: `${Api.Business}`, data: params });
- };
- export const getProject = () => {
- return defHttp.get({ url: Api.getProject });
- };
|