shop.shopCategory.js
3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
module.exports = function (app){
app.get("/shop/shopCategory/index", "shop.ShopCategory.Index", function (req,res){
this.$extend={
moduleName:"店铺管理",
pageName:"店铺商品分类"
}
});
app.get("/shop/shopCategory/index/:shopId", "shop.ShopCategory.Index", function (req,res){
this.$extend={
moduleName:"店铺管理",
pageName:"店铺商品分类"
}
});
app.get("/shop/shopCategory/edit/:shopId/:categoryId/", "shop.ShopCategory.Edit", ["shopCategory_selectShopNameById", "shopCategory_selectCategoryNameById"], function (rs1, rs2){
this.$extend={
moduleName:"店铺管理",
pageName:"店铺商品分类",
subPageName:"店铺商品分类编辑",
shopName: rs1.data,
categoryName: rs2.data
}
});
app.get("/shop/shopCategory/info/:shopId/:categoryId/", "shop.ShopCategory.Info", ["shopCategory_selectShopNameById", "shopCategory_selectCategoryNameById"], function (rs1, rs2){
this.$extend={
moduleName:"店铺管理",
pageName:"店铺商品分类",
subPageName:"店铺商品分类详情",
shopName: rs1.data,
categoryName: rs2.data
}
});
app.get("/shop/shopCategory/batch", "shop.ShopCategory.Batch", function (req,res){
this.$extend={
moduleName:"店铺管理",
pageName:"批量设置"
}
});
/*****************************Vue单页面写法*****************************/
app.vue("/shop/shopCategory", "shop.ShopCategory", function (req,res){
this.$extend={
moduleName:"店铺管理",
pageName:"店铺商品分类"
}
});
//根据店铺ID获取店铺名称
app.post("/shops/shopCategory/getShopName","shopCategory_selectShopNameById");
//店铺销售类目列表
app.post("/shops/shopCategory/list","shopCategory_shopsCategoryList");
//店铺商品分类列表,仅用于装修页面,下拉选择商品分类的场景
app.post("/shops/shopCategory/categoryList", "shopCategory_selectCategoryList");
//新增店铺销售类目
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");
}