WebAction.php
1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?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);
}
}