index.js 1.8 KB

123456789101112131415161718192021222324252627282930
  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("/crawlData", priceInfoController.auth, priceInfoController.init, priceInfoController.crawlData);
  14. router.post("/importExcel", priceInfoController.auth, priceInfoController.init, priceInfoController.importExcel);
  15. router.post("/editArea", priceInfoController.auth, priceInfoController.init, priceInfoController.editArea);
  16. router.post("/insertArea", priceInfoController.auth, priceInfoController.init, priceInfoController.insertArea);
  17. router.post("/deleteArea", priceInfoController.auth, priceInfoController.init, priceInfoController.deleteArea);
  18. router.post("/getClassData", priceInfoController.auth, priceInfoController.init, priceInfoController.getClassData);
  19. router.post("/getPriceData", priceInfoController.auth, priceInfoController.init, priceInfoController.getPriceData);
  20. router.post("/editPriceData", priceInfoController.auth, priceInfoController.init, priceInfoController.editPriceData);
  21. router.post("/editClassData", priceInfoController.auth, priceInfoController.init, priceInfoController.editClassData);
  22. app.use("/priceInfo", router);
  23. };