Index.php 788 Bytes
<?php

use Action\AbstractAction;
use LibModels\Wap\Home\IndexData;
use Plugin\Helpers;

/**
 * 频道选择
 */
class IndexController extends AbstractAction
{
    const CODE_BANNER = '7ba9118028f9b22090b57341487567eb';
    
    /**
     * 启动首页频道选择
     */
    public function indexAction()
    {
        $data = array(
            'background' => '',
        );
        
        // 背景图获取
        $banner = IndexData::getBannerStart(self::CODE_BANNER); 
        if (isset($banner['data'][0]['data']['list'][0]['src'])) {
            $data['background'] = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 1);
        }
        $banner = array();
        
        // 渲染模板
        $this->_view->display('index', $data);
    }

}