platform-controller.js
4.3 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
var express = require('express');
var router = express.Router();
var Mock = require('mockjs');
//var client = require('../client');
var client = require('./client.js');
var api = require('../../health880/routes/operation/api.js').url;
//var api = require('../api').url;
router.get('/',function(req,res,next){
var s=Mock.mock({
'data|5-8':[
{
'id|+1':1,
'time':"@datetime()",
'title':"@csentence(20)",
'describe':"@csentence(50)",
'type|0-2':0,
'author':"@cname()",
'status|0-1':0,
'browsenumber|10-1000':0
}
],'totalPages|20-50':0,'errorCode':0
});
res.send(s);
/*client.get(api.operation_dictionary_dictionarypackList,
{ parameters: req.query }, function (data) {
res.send(data);
},
req.session);*/
})
router.post('/:id',function(req,res,next){
var s=Mock.mock({
'errorCode':'0',
'id|100-200':0,
})
res.send(s);
})
router.get('/:id',function(req,res,next){
var s=Mock.mock({
'data':
{
'id|+1':1,
'time':"@datetime()",
'title':"@csentence(20)",
'describe':"@csentence(200)",
'type|0-2':0,
'author':"@cname()",
'status|0-1':0,
'browsenumber|10-1000':0,
'cons|1-5':[
{
'id|+1':1,
'title':"@csentence(20)",
'text':"@csentence(500)",
"links|1-3":[
{
'link':"@url",
'title':'@csentence(10)'
}
]
}
],
'matters|2-3':[
{
'text':"@csentence(20)"
}
]
},'errorCode':0
});
res.send(s);
})
//star 9-9 投放栏目
router.get('/sitedata/list',function(req,res,next){
var s=Mock.mock({
'errorCode':0,
'data':{
"运营端":{
"权限管理":[
{"title":"菜单配置","path":'authoritymenuconfig'}
,{"title":"角色配置","path":'authorityRoleConfig'}
],
"系统字典":[
{"title":"系统参数","path":'systemDictionary'},
{"title":"资料指标","path":'dataIndicators'},
{"title":'资料指标-属性配置',"path":'dataIndicators/attr/*'}
]
},
"医院端":{
"基本资料管理":[
{"title":"医疗机构管理","path":""},
{"title":"人员信息管理","path":""}
],
"供应端管理":[
{"title":"资料审核","path":""},
{"title":"变更通知","path":""}
]
},
"配送端":{
"基础资料":[
{"title":"配送端资料","path":""},
{"title":"人员信息管理","path":""}
],
"业务资料":[
{"title":"资料审核","path":""},
{"title":"商品清单","path":""}
]
},
"供应端":{
"企业资料":[
{"title":"业务员","path":""}
],
"商品清单":[
{"title":"新增商品","path":""},
{"title":"产品证照","path":""}
]
}
}
})
res.send(s);
})
//star 9-10 投放栏目
router.get('/sitedata/links',function(req,res,next){
var s=Mock.mock({
'errorCode':0,
'data':{
"运营端":{
"权限管理":[
{"path":"authoritymenuconfig","title":"菜单配置","link":"@url"},
{"path":"authorityRoleConfig","title":"角色配置","link":"@url"}
],
"系统字典":[
{"path":"systemDictionary","title":"系统参数","link":"@url"},
{"path":"dataIndicators","title":"资料指标","link":"@url"},
{"path":"dataIndicators/attr/*","title":"资料指标-属性配置","link":"@url"}
]
},
"医院端":{
"基本资料管理":[
{"path":"","title":"医疗机构管理","link":"@url"},
{"path":"","title":"人员信息管理","link":"@url"}
],
"供应端管理":[
{"path":"","title":"资料审核","link":"@url"},
{"path":"","title":"变更通知","link":"@url"}
]
},
"配送端":{
"基础资料":[
{"title":"配送端资料","link":"@url"},
{"title":"人员信息管理","link":"@url"}
],
"业务资料":[
{"title":"资料审核","link":"@url"},
{"title":"商品清单","link":"@url"}
]
},
"供应端":{
"企业资料":[
{"title:":"业务员","link":"@url"}
],
"商品清单":[
{"title":"新增商品","link":"@url"},
{"title":"产品证照","link":"@url"}
]
}
}
});
res.send(s);
})
router.get('/sitedata/links/:id',function(req,res,next){
var s=Mock.mock({
'errorCode':0,
'data':{"path":"dataIndicators/attr/*","title":"资料指标-属性配置","link":"@url"}
});
res.send(s);
})
module.exports=router;