Index.php
2.18 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
<?php
use Action\WebAction;
use WebPlugin\Helpers;
use Home\UserModel;
use Home\IndexModel;
use LibModels\Web\Home\OrderData;
/**
* 个人中心首页
*/
class IndexController extends WebAction
{
/**
* 个人中心首页
*/
public function indexAction()
{
$uid = $this->auditJumpLogin(true, Helpers::url('/home'));
//头部导航
$channel = Helpers::getChannelNameByCookie();
$this->setWebNavHeader($channel);
//面包屑-左侧导航
$path = array(
array(
'href' => SITE_MAIN,
'name' => 'YOHO!BUY 有货首页'
),
array(
'name' => '个人中心'
),
);
$leftNav = UserModel::getCenterLeftNav('', $uid);
$data = IndexModel::homeData();
$udid = $uid . $this->getUdid();
// 为你优选 tar add 160701
$data['recommend'] = IndexModel::preferenceData($channel, $uid, $udid, '100004', 30);
//取消订单原因列表
$resons = OrderData::closeReasons();
$cancelReason = isset($resons['data']) ? $resons['data'] : '';
$data = array(
'path' => $path,
'userThumb' => UserModel::getUserHeadImg($uid),
'homeNav' => $leftNav,
'cancelReason' => $cancelReason,
'content' => array(
array(
//消息提示
'messages' => IndexModel::getInfoNumData($uid, $udid)
),
array(
//最新订单
'latestOrders' => IndexModel::latestOrders($uid),
'favBrand' => array(
'more' => '/brands',
'brands' => $data['brand']
),
'newArrival' => $data['new']
)
),
'recommend' => $data['recommend'], //待处理
'banner' => IndexModel::getFooterBanner(),
'helpUsUrl' => ''
);
$this->_view->display('index', array('meIndexPage' => true, 'me' => $data));
}
}