product.js
4.16 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//接口主域
var env = process.env.NODE_ENV || 'development';
// exports.domain = 'http://192.168.102.205:18025';
var domain = {
development:'http://localhost:30011',
//development:'http://172.16.6.227:8083/yohobuy-platform-web',
test:'http://192.168.102.205:18025/yoho-adminportal-web',
preview:'http://192.168.81.13:8189/yoho-admin-portal',
production:'http://192.168.81.6:8189/yoho-admin-portal'
};
exports.domain = domain[env];
//路由配置
exports.res = [
{
//产品管理【品类列表】页面渲染
route: '/product/class/index',
method: 'GET',
view: 'pages/product/index',
src: '/product/index',
url: '/product/queryAllProductSortList',
isJsonRaw:true
},{
//产品管理【ajax查询所有品类】
route: '/product/class/queryAllProductSortList',
method: 'POST',
url: '/product/queryAllProductSortList',
isJsonRaw:true
},{
//产品管理【根据ID ajax查询子品类列表】
route: '/product/class/queryProductSortList',
method: 'POST',
url: '/product/queryProductSortList',
isJsonRaw:true,
params: [
{
name: 'param',
type: 'Number'
}
]
},{
//产品管理>【品类列表ajax更新】
route: '/product/class/update',
method: 'POST',
url: '/product/updateProductSort',
isJsonRaw:true,
params: [
{
name: 'param',
type: 'Number'
},{
name: 'sortName',
type: 'String'
},{
name: 'sortInitials',
type: 'String'
},{
name:'firstSortId',
type: 'String'
},{
name: 'secondSortId',
type: 'String'
},{
name: 'thirdSortId',
type: 'String'
},{
name: 'orderBy',
type: 'Number'
},{
name: 'status',
type: 'Number'
}
]
},{
//产品管理>【添加品类】页面渲染
route: '/product/class/new',
method: 'GET',
view: 'pages/product/new-class',
noApi:true,
src: '/product/add'
},{
//产品管理>【添加品类】ajax请求接口
route: '/product/class/addProductSort',
method: 'POST',
url: '/product/addProductSort',
isJsonRaw:true,
params: [
{
name: 'param',
type: 'Number'
},{
name: 'sortName',
type: 'String'
},{
name: 'sortInitials',
type: 'String'
},{
name:'firstSortId',
type: 'String'
},{
name: 'secondSortId',
type: 'String'
},{
name: 'thirdSortId',
type: 'String'
},{
name: 'orderBy',
type: 'Number'
},{
name: 'status',
type: 'Number'
}
]
},{
//产品管理>【编辑品类】页面
route: '/product/class/edit/:param',
method: 'GET',
view: 'pages/product/new-class',
url: '/product/getProductSort',
src: '/product/index',
isJsonRaw:true,
params: [
{
name: 'param',
type: 'Number'
}
]
},{
//产品管理>【产品属性】页面渲染
route: '/product/attr/index',
method: 'GET',
view: 'pages/product/product-attr',
url: '/product/attr',
src: '/product/index'
},{
//产品管理>【产品属性ajax获取】
route: '/product/attr/get',
method: 'POST',
url: '/product/getAttr',
isJsonRaw:true
},{
//产品管理>【添加产品属性ajax】
route: '/product/attr/add',
method: 'POST',
url: '/product/addAttr',
isJsonRaw:true
}
];