Index.php 845 Bytes
<?php
use Action\AbstractAction;
use LibModels\Wap\Home\IndexData as Index;

/**
 * 频道选择
 */
class IndexController extends AbstractAction
{

	/**
	 * 启动首页
	 */
    public function indexAction()
    {
    	// 启动滚动图
    	$startBannerData = Index::getBannerStart();
    	$startBanner = array();
    	if($startBannerData['code'] == 200)
    	{
    		foreach ($startBannerData['data'] as $single)
    		{
    		    $startBanner =  $single['data'];
    		}
    		
    	}
    	// 启动频道数据
    	$homeChannels = Index::getHomeChannels();
    	// 用户个人信息
    	$userProfile = Index::getUserProfile(0);

    	/*echo '<pre>';
    	var_dump($homeChannels);exit;*/

		$this->_view->assign('title', 'YOHO!有货');
    	$this->_view->display('index', compact('startBanner', 'homeChannels', 'userProfile'));
    }
}