/** * Created by zhang on 2018/9/3. */ const express = require("express"); const router = express.Router(); const { priceInfoController } = require('../controllers/index'); module.exports = function (app) { router.get("/main", priceInfoController.auth, priceInfoController.init, priceInfoController.main); router.get("/edit", priceInfoController.auth, priceInfoController.init, priceInfoController.editView); router.post("/addLib", priceInfoController.auth, priceInfoController.init, priceInfoController.addLib); router.post("/renameLib", priceInfoController.auth, priceInfoController.init, priceInfoController.renameLib); router.post("/deleteLib", priceInfoController.auth, priceInfoController.init, priceInfoController.deleteLib); router.post("/processChecking", priceInfoController.auth, priceInfoController.init, priceInfoController.processChecking); router.post("/crawlData", priceInfoController.auth, priceInfoController.init, priceInfoController.crawlData); router.post("/importExcel", priceInfoController.auth, priceInfoController.init, priceInfoController.importExcel); router.post("/editArea", priceInfoController.auth, priceInfoController.init, priceInfoController.editArea); router.post("/insertArea", priceInfoController.auth, priceInfoController.init, priceInfoController.insertArea); router.post("/deleteArea", priceInfoController.auth, priceInfoController.init, priceInfoController.deleteArea); router.post("/getClassData", priceInfoController.auth, priceInfoController.init, priceInfoController.getClassData); router.post("/calcPriceIndex", priceInfoController.auth, priceInfoController.init, priceInfoController.calcPriceIndex); router.post("/getPriceData", priceInfoController.auth, priceInfoController.init, priceInfoController.getPriceData); router.post("/editPriceData", priceInfoController.auth, priceInfoController.init, priceInfoController.editPriceData); router.post("/editClassData", priceInfoController.auth, priceInfoController.init, priceInfoController.editClassData); router.get("/export", priceInfoController.auth, priceInfoController.init, priceInfoController.exportPriceData); app.use("/priceInfo", router); };