category.js
1.34 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
/**
* Created by ty on 2016/6/21.
* 分类管理
*/
module.exports=function(app) {
/*分类管理首页*/
app.get("/operations/category/index","operations.category.Index");
/*分类管理添加页面*/
app.get("/operations/category/add","operations.category.Edit", "resourceManage_getUrlAction", function (response) {
this.$extend = {
data:response.data,
action:"/category/addCategory",
type:"add"
};
});
/*分类管理编辑页面*/
app.get("/operations/category/edit/:param","operations.category.Edit", "resourceManage_getUrlAction", function (response) {
this.$extend = {
data:response.data,
action:"/category/updateCategory",
type:"edit"
};
});
/*分类列表*/
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");
}