index.js 1.39 KB
import api from "../index";
import urls from "./urls";

export default {
  //code
  storeconfs(params, id) {
    return api.get(urls.storeconfs, params);
  },
  cates(params, id) {
    return api.get(urls.cates, params);
  },
  codes(params, id) {
    return api.get(urls.codes + id + "/codes", params);
  },
  customCode(params, id) {
    return api.get(urls.customCode, params);
  },
  eventCates(params) {
    return api.get(urls.eventCates, params);
  },
  eventType(params, event_cate_unid) {
    return api.get(urls.eventType(event_cate_unid), params);
  },
  eventTypes(params, id) {
    return api.get(urls.eventTypes, params);
  },
  addEventTypes(params, id) {
    return api.post(urls.eventTypes, params);
  },
  editEventType(params, event_unid) {
    return api.post(urls.editEventType(event_unid), params);
  },
  deleteEventType(params, event_unid) {
    return api.delete(urls.editEventType(event_unid), params);
  },
  addTrafficCode(params, cate_unid) {
    return api.post(urls.addTrafficCode(cate_unid), params);
  },
  editTrafficCode(params, cate_unid, code_unid) {
    return api.post(urls.editTrafficCode(cate_unid, code_unid), params);
  },
  deleteTrafficCode(cate_unid,code_unid,params) {
    return api.delete(urls.editTrafficCode(cate_unid, code_unid), params);
  },
  editcustomCode(cate_unid,code_unid,params) {
    return api.post(urls.editcustomCode(cate_unid, code_unid), params);
  }
};