Index.php 1.82 KB
<?php

use Action\WebAction;
use WebPlugin\Helpers;
use Home\UserModel;
use Home\IndexModel;

/**
 * 个人中心首页
 */
class IndexController extends WebAction
{

    /**
     * 个人中心首页
     */
    public function indexAction()
    {
        $uid = $this->auditJumpLogin();
        //头部导航
        $channel = Helpers::getChannelNameByCookie();
        $this->setWebNavHeader($channel);
        //面包屑-左侧导航
        $path = array(
            array(
                'href' => SITE_MAIN,
                'name' => 'YOHO!有货首页'
            ),
            array(
                'name' => '个人中心'
            ),
        );
        $leftNav = UserModel::getCenterLeftNav('');
        $data = IndexModel::homeData();
        $udid = $uid . $this->getUdid();
        $data = array(
            'path' => $path,
            'userThumb' => UserModel::getUserHeadImg($uid),
            'homeNav' => $leftNav,
            'content' => array(
                array(
                    //消息提示
                    'messages' => IndexModel::getInfoNumData($uid, $udid)
                ),
                array(
                    //最新订单
                    'latestOrders' => IndexModel::latestOrders($uid),
                    'favBrand' => array(
                        'more' => '/brands',
                        'brands' => $data['brand']
                    ),
                    'newArrival' => $data['new'],
                    'banner' => array(
                        'href' => '',
                        'img' => 'http://img02.static.yohobuy.com/adpic/2015/07/23/15/020d2a20f6693cae4b572caf8e1fd7c37e.jpg'
                    )
                )
            ),
            'helpUsUrl' => ''
        );
        $this->_view->display('index', array('meIndexPage' => true, 'me' => $data));
    }
}