shopCategory.js 1.8 KB
module.exports = function (app){
    app.get("/shop/shopCategory/index", "shop.ShopCategory.Index", function (req,res){
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺商品分类"
        }
    });

    app.get("/shop/shopCategory/edit/:categoryId/", "shop.ShopCategory.Edit", "shopCategory_selectCategoryNameById", function (rs){
        this.$extend={
            moduleName:"店铺管理",
            pageName:"店铺商品分类",
            subPageName:"店铺商品分类编辑",
            categoryName: rs.data
        }
    });

    app.get("/shop/shopCategory/batch", "shop.ShopCategory.Batch", function (req,res){
        this.$extend={
            moduleName:"店铺管理",
            pageName:"批量设置"
        }
    });

    //店铺销售类目列表
    app.post("/shops/shopCategory/list","shopCategory_shopsCategoryList");

    //新增店铺销售类目
    app.post("/shops/shopCategory/add","shopCategory_insertShopsAndLinkCategory");
    
    //编辑店铺销售类目
    app.post("/shops/shopCategory/update","shopCategory_updateShopsAndLinkCategory");

    //删除店铺销售类目
    app.post("/shops/shopCategory/delete","shopCategory_deleteShopsCategory");

    //获取店铺下该类目所有商品接口
    app.post("/shops/shopCategory/allProducts","shopCategory_selectAllProduct");

    //获取店铺下该类目已选商品接口
    app.post("/shops/shopCategory/selectedProducts","shopCategory_selectCheckedProduct");

    //选择关联
    app.post("/shops/shopCategory/link","shopCategory_insertProductLinkCategory");

    //取消选择
    app.post("/shops/shopCategory/unlink","shopCategory_deleteProductLinkCategory");

    //全部取消选择
    app.post("/shops/shopCategory/unlinkAll","shopCategory_deleteAllProductLinkedCategory");

}