ExhibitionController.php
8.0 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<?php
/**
* 关于展会
* Author : xiaojie
* DateTime: 2018/12/06 10:35
*/
namespace app\portal\controller;
use app\portal\model\PageModel;
use app\portal\model\PortalCategoryModel;
use app\portal\model\ShowModel;
use app\portal\model\LineModel;
use cmf\controller\HomeBaseController;
class ExhibitionController extends HomeBaseController
{
/**
* 展会介绍
* portal/exhibition/introduce
*/
public function introduce()
{
$cate_id = 8;
$pageModel = new PageModel();
$info = $pageModel->where('cate_id',$cate_id)->find();
$this->setPageNum($info['id']);
//所在位置
$location = [
[
'location' => '关于展会',
'url' => 'javascript:;'
],
[
'location' => '展会介绍',
'url' => url('portal/exhibition/introduce')
]
];
$this->assign('info',$info);
$this->assign('location',$location);
return $this->fetch(':page');
}
/**
* 展品范围
* portal/exhibition/range
*/
public function range()
{
$cate_id = 9;
$pageModel = new PageModel();
$info = $pageModel->where('cate_id',$cate_id)->find();
$this->setPageNum($info['id']);
//所在位置
$location = [
[
'location' => '关于展会',
'url' => 'javascript:;'
],
[
'location' => '展品范围',
'url' => url('portal/exhibition/range')
]
];
$this->assign('info',$info);
$this->assign('location',$location);
return $this->fetch(':page');
}
/**
* 零部件展览
* portal/exhibition/range
*/
public function component()
{
$cate_id = 63;
$pageModel = new PageModel();
$info = $pageModel->where('cate_id',$cate_id)->find();
$this->setPageNum($info['id']);
//所在位置
$location = [
[
],
[
'location' => '零部件展览',
'url' => url('portal/exhibition/component')
]
];
$this->assign('info',$info);
$this->assign('location',$location);
return $this->fetch(':cpage');
}
/**
* 展会数据
* portal/exhibition/data
*/
public function data()
{
$cate_id = 10;
$pageModel = new PageModel();
$info = $pageModel->where('cate_id',$cate_id)->find();
$this->setPageNum($info['id']);
//所在位置
$location = [
[
'location' => '关于展会',
'url' => 'javascript:;'
],
[
'location' => '展会数据',
'url' => url('portal/exhibition/data')
]
];
$this->assign('info',$info);
$this->assign('location',$location);
return $this->fetch(':page');
}
/**
* 展厅分布
* portal/exhibition/distribution
*/
public function distribution()
{
$cate_id = 11;
$pageModel = new PageModel();
$info = $pageModel->where('cate_id',$cate_id)->find();
$this->setPageNum($info['id']);
//所在位置
$location = [
[
'location' => '关于展会',
'url' => 'javascript:;'
],
[
'location' => '展厅分布',
'url' => url('portal/exhibition/distribution')
]
];
$this->assign('info',$info);
$this->assign('location',$location);
return $this->fetch(':page');
}
/**
* 参展须知
* portal/exhibition/notice
*/
public function notice()
{
$cate_id = 12;
$pageModel = new PageModel();
$info = $pageModel->where('cate_id',$cate_id)->find();
$this->setPageNum($info['id']);
//所在位置
$location = [
[
'location' => '关于展会',
'url' => 'javascript:;'
],
[
'location' => '参展须知',
'url' => url('portal/exhibition/notice')
]
];
$this->assign('info',$info);
$this->assign('location',$location);
return $this->fetch(':page');
}
/**
* 历届回顾
* portal/exhibition/review
*/
public function review()
{
$cate_id = 13;
$cateModel = new PortalCategoryModel();
$list = $cateModel
->field('id,name,description,update_time,more')
->where('parent_id',$cate_id)
->paginate(6,false);
//所在位置
$location = [
[
'location' => '关于展会',
'url' => 'javascript:;'
],
[
'location' => '历届回顾',
'url' => url('portal/exhibition/review')
]
];
//获取分页样式
$page = $this->getPageStyle($list);
$this->assign('list',$list);
$this->assign('page',$page);
$this->assign('location',$location);
return $this->fetch();
}
/**
* 历届回顾详情
* portal/exhibition/review_detail
*/
public function review_detail()
{
$cate_id = $this->request->param('cate_id','','intval');
$two_cate_id = $this->request->param('two_cate_id','','intval');
$cateModel = new PortalCategoryModel();
$showModel = new ShowModel();
$day_list = $cateModel
->field('id,name')
->where('parent_id',$cate_id)
->order('id DESC')
->select();
if(empty($two_cate_id)){
$two_cate_id = $day_list[0]['id'];
}
$list = $showModel->getList($two_cate_id,'',25);
$page = $this->getPageStyle($list);
//所在位置
$location = [
[
'location' => '关于展会',
'url' => 'javascript:;'
],
[
'location' => '回顾详情',
'url' => 'javascript:;'
]
];
$this->assign('location',$location);
$this->assign('day_list',$day_list);
$this->assign('cate_id',$cate_id);
$this->assign('two_cate_id',$two_cate_id);
$this->assign('page',$page);
$this->assign('list',$list);
return $this->fetch();
}
//移动端关于展会
public function about(){
$cate_id = 8;
$pageModel = new PageModel();
$info = $pageModel->where('cate_id',$cate_id)->find();
$this->setPageNum($info['id']);
$this->assign('info',$info);
return $this->fetch();
}
//移动端导览活动
public function activity(){
return $this->fetch();
}
//移动端新闻报道ok
public function newReport(){
return $this->fetch();
}
//移动端论坛活动
public function forumActivity(){
return $this->fetch();
}
//移动端展商详情
public function businessDetail(){
return $this->fetch();
}
//移动端网上展厅
public function onlineShow1(){
return $this->fetch();
}
//移动端网上展厅
public function onlineShow2(){
return $this->fetch();
}
//移动端网上展厅
public function onlineShow3(){
return $this->fetch();
}
//移动端网上展厅
public function onlineShow4(){
return $this->fetch();
}
public function get_line(){
$lineModel = new LineModel();
$cate_id = $this->request->param('cate_id');
$page = $this->request->param('page');
$info = $lineModel
->where(['cate_id'=>$cate_id])
->page($page,1)
->select();
foreach($info as &$value){
$value['thumb'] = cmf_get_image_url($value['thumb']);
}
echo json_encode($info);
}
}