category.js
1.63 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
/**
* Created by ty on 2016/6/21.
* 分类管理
*/
module.exports=function(app) {
/*分类管理首页*/
app.get("/operations/category/index","operations.category.Index", function () {
this.$extend = {
moduleName: "分类管理",
pageName: "分类列表管理"
}
});
/*分类管理添加页面*/
app.get("/operations/category/add","operations.category.Edit", "resourceManage_getUrlAction", function (response) {
this.$extend = {
data:response.data,
action:"/category/addCategory",
type:"add",
moduleName: "分类管理",
pageName: "添加分类"
};
});
/*分类管理编辑页面*/
app.get("/operations/category/edit/:param","operations.category.Edit", "resourceManage_getUrlAction", function (response) {
this.$extend = {
data:response.data,
action:"/category/updateCategory",
type:"edit",
moduleName: "分类管理",
pageName: "编辑分类"
};
});
/*分类列表*/
app.post("/category/getCategoryList","category_getCategoryList");
/*更新分类状态*/
app.post("/category/updateCategoryStatus","category_updateCategoryStatus");
/*根据id获取分类对象*/
app.post("/category/getOneCategory","category_getOneCategory");
/*添加分类*/
app.post("/category/addCategory","category_addCategory");
/*修改分类*/
app.post("/category/updateCategory","category_updateCategory");
/*获取分类列表*/
app.post("/category/getCategories","category_getCategories");
}