ActivityController.php
2.8 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
<?php
/**
* 同期活动
* Author : xiaojie
* DateTime: 2018/12/06 11:39
*/
namespace app\portal\controller;
use app\portal\model\PageModel;
use app\portal\model\PortalCategoryModel;
use app\portal\model\ShowModel;
use cmf\controller\HomeBaseController;
class ActivityController extends HomeBaseController
{
/**
* 专业论坛(汽车产业装备与智能制造峰会)
* portal/activity/forum
*/
public function forum()
{
return $this->fetch();
}
/**
* 现场活动
* portal/activity/scene
*/
public function scene()
{
$cate_id = 34;
$showModel = new ShowModel();
$list = $showModel->getList($cate_id);
//分页样式
$page = $this->getPageStyle($list);
//所在位置
$location = [
[
'location' => '同期活动',
'url' => 'javascript:;'
],
[
'location' => '现场活动',
'url' => url('portal/activity/scene')
]
];
$this->assign('list',$list);
$this->assign('location',$location);
$this->assign('page',$page);
$this->assign('menu_id',40);
return $this->fetch(':list');
}
/**
* 现场活动详情
* portal/activity/scene_detail
*/
public function scene_detail()
{
$id = $this->request->param('id','','intval');
$location1 = $this->request->param('location1','');
$location2 = $this->request->param('location2','');
$showModel = new ShowModel();
$info = $showModel->getDetail($id);
$this->setShowNum($info['id']);
//所在位置
$location = [
[
'location' => $location1,
'url' => 'javascript:;'
],
[
'location' => $location2.'详情',
'url' => 'javascript:;'
]
];
$this->assign('info',$info);
$this->assign('location',$location);
return $this->fetch(':page');
}
/**
* 采购对接会
* portal/activity/purchase
*/
public function purchase()
{
$cate_id = 35;
$showModel = new ShowModel();
//列表信息
$list = $showModel->getList($cate_id);
//分页样式
$page = $this->getPageStyle($list);
//所在位置
$location = [
[
'location' => '同期活动',
'url' => 'javascript:;'
],
[
'location' => '采购对接会',
'url' => 'javascript:;'
]
];
$this->assign('list',$list);
$this->assign('location',$location);
$this->assign('page',$page);
$this->assign('menu_id',41);
return $this->fetch(':list');
}
}