Index.php
918 Bytes
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
<?php
use Action\AbstractAction;
use LibModels\Wap\Home\IndexData;
/**
* 频道选择
*/
class IndexController extends AbstractAction
{
/**
* 启动首页频道选择
*/
public function indexAction()
{
// 启动滚动图
$startBannerData = IndexData::getBannerStart();
$startBanner = array();
if ($startBannerData['code'] == 200) {
foreach ($startBannerData['data'] as $single) {
$startBanner = $single['data'];
}
}
// 启动频道数据
$homeChannels = IndexData::getHomeChannels();
// 用户个人信息
$userProfile = IndexData::getUserProfile(0);
/* echo '<pre>';
var_dump($homeChannels);exit; */
$this->_view->assign('title', 'YOHO!有货');
$this->_view->display('index', compact('startBanner', 'homeChannels', 'userProfile'));
}
}