index.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Created by zhang on 2018/9/3.
  3. */
  4. const express = require("express");
  5. const router = express.Router();
  6. const { priceInfoController } = require('../controllers/index');
  7. module.exports = function (app) {
  8. router.get("/main", priceInfoController.auth, priceInfoController.init, priceInfoController.main);
  9. router.get("/edit", priceInfoController.auth, priceInfoController.init, priceInfoController.editView);
  10. router.post("/addLib", priceInfoController.auth, priceInfoController.init, priceInfoController.addLib);
  11. router.post("/renameLib", priceInfoController.auth, priceInfoController.init, priceInfoController.renameLib);
  12. router.post("/deleteLib", priceInfoController.auth, priceInfoController.init, priceInfoController.deleteLib);
  13. router.post("/processChecking", priceInfoController.auth, priceInfoController.init, priceInfoController.processChecking);
  14. router.post("/crawlData", priceInfoController.auth, priceInfoController.init, priceInfoController.crawlData);
  15. router.post("/importExcel", priceInfoController.auth, priceInfoController.init, priceInfoController.importExcel);
  16. router.post("/editArea", priceInfoController.auth, priceInfoController.init, priceInfoController.editArea);
  17. router.post("/insertArea", priceInfoController.auth, priceInfoController.init, priceInfoController.insertArea);
  18. router.post("/deleteArea", priceInfoController.auth, priceInfoController.init, priceInfoController.deleteArea);
  19. router.post("/getClassData", priceInfoController.auth, priceInfoController.init, priceInfoController.getClassData);
  20. router.post("/calcPriceIndex", priceInfoController.auth, priceInfoController.init, priceInfoController.calcPriceIndex);
  21. router.post("/getPriceData", priceInfoController.auth, priceInfoController.init, priceInfoController.getPriceData);
  22. router.post("/editPriceData", priceInfoController.auth, priceInfoController.init, priceInfoController.editPriceData);
  23. router.post("/editClassData", priceInfoController.auth, priceInfoController.init, priceInfoController.editClassData);
  24. router.post("/matchSummary", priceInfoController.auth, priceInfoController.init, priceInfoController.matchSummary);
  25. router.post("/getPriceEmptyData", priceInfoController.auth, priceInfoController.init, priceInfoController.getPriceEmptyData);
  26. router.post("/getRecommendPriceSummaryData", priceInfoController.auth, priceInfoController.init, priceInfoController.getRecommendPriceSummaryData);
  27. router.get("/exportInfoPriceByLib", priceInfoController.auth, priceInfoController.init, priceInfoController.exportInfoPriceByLib);
  28. router.get("/exportInfoPriceByCompilation", priceInfoController.auth, priceInfoController.init, priceInfoController.exportInfoPriceByCompilation);
  29. router.post("/getAllLibs", priceInfoController.auth, priceInfoController.init, priceInfoController.getAllLibs);
  30. router.post("/batchUpdate", priceInfoController.auth, priceInfoController.init, priceInfoController.batchUpdate);
  31. app.use("/priceInfo", router);
  32. };