WebAction.php 1.98 KB
<?php
namespace Action;
use Index\HomeModel;
class WebAction extends AbstractAction
{
    /**
     * 设置头部
     * 
     * @param string $channel (默认不设置)
     * @return 
     */
    protected function setWebNavHeader($channel = '')
    {
        if(empty($channel)) {
            $channel = \Index\HomeModel::getSwitchChannel();
        } 
        else {//设置频道
            \Index\HomeModel::setSwitchToCookie($channel);
        }
        $header = array(
            'navbars'=>\Index\HomeModel::getNavBars($channel),
            'gobytype'=> 'gobuy'.$channel,
            'searchcate'=>'searchcate'.$channel,
             'myyoho' => array(
			    'email'=>'hhh@126.com',
				'viptype'=>'普通会员',
				'currentscore' => 495,
				'totalscore' => 600,
				'cardtype' => '银卡',
				'infolist' =>  array(
				    array(
					    'name' =>'待处理的订单',
					    'link' =>'',
					    'num' => '0'
					),
					array(
					    'name' =>'我的收藏',
					    'link' =>'',
					    'num' => '1'
					),
                    array(
					    'name' =>'我的优惠券',
					    'link' =>'',
					    'num' => '2'
					),
                    array(
					    'name' =>'我的YOHO币',
					    'link' =>'',
					    'num' => '1'
					),
                    array(
					    'name' =>'我的退货换货',
					    'link' =>'',
					    'num' => '1'
					)
				),
				'updlink' => ''
			),
			'gobuy'=> array(
			    'gobuynum' =>3
			),
			'breadcrumbnav'=> array(
			    array(
				    'notend'=>array(
					    'link' => 'http=>//www.baidu.com',
					    'name' => 'BOYS首页'
					) 
				),
				array(
				    'notend'=>array(
				    'link' => 'http=>//www.baidu.com',
					'name' => '上衣'
				    ) 
			    ),
				array(
				    'isend'=>array(
				    'link' => 'http=>//www.baidu.com',
					'name' => '衬衫'
					) 
				)
			)
        );
        $this->_view->assign('headerdata', $header);
    }
}