index.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334
  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.get("/export", priceInfoController.auth, priceInfoController.init, priceInfoController.exportPriceData);
  25. app.use("/priceInfo", router);
  26. };