|
|
<?php
|
|
|
|
|
|
use Action\AbstractAction;
|
|
|
use Index\IndexModel;
|
|
|
use Plugin\Helpers;
|
|
|
use LibModels\Wap\Index\IndexData;
|
|
|
|
|
|
/**
|
|
|
* 频道选择
|
...
|
...
|
@@ -15,25 +15,25 @@ class IndexController extends AbstractAction |
|
|
*/
|
|
|
public function indexAction()
|
|
|
{
|
|
|
// if (null !== $this->get('go')) {
|
|
|
// // 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
|
|
|
// Index\HomeModel::goSwitchChannel();
|
|
|
// } else {
|
|
|
// // 设置客户端浏览器1小时内不改变,
|
|
|
// $this->setLastModified(mktime(date('H'), 0, 0, date('n'), date('j'), date('Y')));
|
|
|
// // 设置浏览器缓存5分钟
|
|
|
// $this->setExpires(300);
|
|
|
// }
|
|
|
var_dump(IndexData::channelData());
|
|
|
if (null !== $this->get('go')) {
|
|
|
// 先检查COOKIE是否有访问过, 有则跳转到相应的频道页
|
|
|
Index\HomeModel::goSwitchChannel();
|
|
|
} else {
|
|
|
// 设置客户端浏览器1小时内不改变,
|
|
|
$this->setLastModified(mktime(date('H'), 0, 0, date('n'), date('j'), date('Y')));
|
|
|
// 设置浏览器缓存5分钟
|
|
|
$this->setExpires(300);
|
|
|
}
|
|
|
$result = IndexModel::getChannel();
|
|
|
$result['background'] = Index\HomeModel::getBgImage();
|
|
|
$result['channelPage'] = true;
|
|
|
$result['showDownloadApp'] = true;
|
|
|
$result['searchUrl'] = Helpers::url('', null, 'search');
|
|
|
$result['pageFooter'] = true;
|
|
|
// 渲染模板
|
|
|
$this->_view->display('index', array(
|
|
|
'background' => Index\HomeModel::getBgImage(),
|
|
|
'channelPage' => true,
|
|
|
'showDownloadApp'=>true,
|
|
|
'searchUrl' => Helpers::url('', null, 'search'),
|
|
|
'pageFooter' => true,
|
|
|
));
|
|
|
$this->_view->display('index', $result);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置升级公告路由
|
|
|
*
|
...
|
...
|
|