categoryManage.js
4.02 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/**
* Created by ty on 2016/5/26.
* 分类管理路由
*/
exports.domain = require('../config/common.js').domain;
//exports.domain = 'http://172.16.6.115:8080/platform';//王伟
//exports.domain = 'http://192.168.102.216:8180/platform'; //测试环境
//exports.domain = 'http://172.16.6.231:8080/platform';
//exports.domain = 'http://172.16.6.225:8080/platform';
//exports.domain = 'http://192.168.102.216:8086/platform';
exports.res = [
{
route: "/operations/category/index",
method: "GET",
view: "pages/operations/categoryManage",
src: "/operations/categoryManage"
},
{
route: "/category/getCategoryList",
method: "POST",
url: "/category/getCategoryList",
params: [
{name: "platform", type: "string"},
{name: "status", type: "string"}
]
},
{
route: "/category/updateCategoryStatus",
method: "POST",
url: "/category/updateCategoryStatus",
params: [
{name: "id", type: "number"},
{name: "status", type: "number"}
]
},
{
route: "/operations/category/add",
method: "GET",
view: "pages/operations/categoryManageAdd",
src: "/operations/categoryManageAdd",
url: '/resources/getUrlAction',
params:[],
data:{
action:"/category/addCategory",
type:"add"
}
},
{
route: "/operations/category/edit/:param",
method: "GET",
view: "pages/operations/categoryManageAdd",
src: "/operations/categoryManageAdd",
url: '/resources/getUrlAction',
params:[],
data:{
action:"/category/updateCategory",
type:"edit"
}
},
{
//根据id获取分类对象
route:"/category/getOneCategory",
method: "POST",
url: "/category/getOneCategory",
params:[
{name:'id', type:'number'}
]
},
{
//添加分类
route: "/category/addCategory",
method: "POST",
url: "/category/addCategory",
params:[
{name: "sortName", type: "string"},
{name: "sortNameEn", type: "string"},
{name: "sortIco", type: "string"},
{name: "sortIcoBig", type: "string"},
{name: "sortUrl", type: "string"},
{name: "firstSortId", type: "string"},
{name: "secondSortId", type: "string"},
{name: "threadSortId", type: "string"},
{name: "platform", type: "string"},
{name: "orderBy", type: "string"},
{name: "isNew", type: "string"},
{name: "isHot", type: "string"},
{name: "contentCode", type: "string"},
{name: "separativeSign", type: "string"},
{name: "sortNameColor", type: "string"},
{name: "isNewPage", type: "string"}
]
},
{
//修改分类
route: "/category/updateCategory",
method: "POST",
url: "/category/updateCategory",
params:[
{name: "id", type: "number"},
{name: "sortName", type: "string"},
{name: "sortNameEn", type: "string"},
{name: "sortIco", type: "string"},
{name: "sortIcoBig", type: "string"},
{name: "sortUrl", type: "string"},
{name: "firstSortId", type: "string"},
{name: "secondSortId", type: "string"},
{name: "threadSortId", type: "string"},
{name: "platform", type: "string"},
{name: "orderBy", type: "string"},
{name: "isNew", type: "string"},
{name: "isHot", type: "string"},
{name: "contentCode", type: "string"},
{name: "separativeSign", type: "string"},
{name: "sortNameColor", type: "string"},
{name: "isNewPage", type: "string"}
]
},
{
//获取分类列表
route: "/category/getCategories",
method: "POST",
url: "/category/getCategories",
params: []
}
];