...
|
...
|
@@ -32,7 +32,7 @@ class HomeController extends AbstractAction |
|
|
if (!$uid && $action !== 'index') {
|
|
|
$this->go(Helpers::url('/signin.html'));
|
|
|
}
|
|
|
|
|
|
|
|
|
parent::init();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -51,12 +51,12 @@ class HomeController extends AbstractAction |
|
|
);
|
|
|
$uid = $this->getUid();
|
|
|
if ($uid) {
|
|
|
// 优选新品数据
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
|
|
|
$data['isLogin'] = true;
|
|
|
$data += UserModel::getUserProfileData($uid);
|
|
|
$data += UserModel::getInfoNumData($uid);
|
|
|
|
|
|
// 优选新品数据
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$data['recommendForYou'] = UserModel::getPreferenceData($channel);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -84,9 +84,9 @@ class HomeController extends AbstractAction |
|
|
'pageFooter' => true,
|
|
|
'favorite' => true,
|
|
|
'hasFavProduct' => $favProducts,
|
|
|
'productUrl' => '/product/new',
|
|
|
'productUrl' => '/product/new',
|
|
|
'hasFavBrand' => $favBrands,
|
|
|
'brandUrl' => '/product/new'
|
|
|
'brandUrl' => '/product/new'
|
|
|
);
|
|
|
// 判断是否为品牌收藏页
|
|
|
if ($tab === 'brand') {
|
...
|
...
|
@@ -143,10 +143,10 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 个人信息
|
|
|
*/
|
|
|
public function personalDetailsAction()
|
|
|
public function mydetailsAction()
|
|
|
{
|
|
|
$this->setTitle('个人信息');
|
|
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
|
|
$this->setNavHeader('个人信息');
|
|
|
|
|
|
$uid = $this->getUid();
|
|
|
$data = UserModel::getUserProfileData($uid);
|
...
|
...
|
@@ -177,7 +177,7 @@ class HomeController extends AbstractAction |
|
|
{
|
|
|
$this->setTitle('优惠券');
|
|
|
$this->setNavHeader('优惠券');
|
|
|
|
|
|
|
|
|
$uid = $this->getUid();
|
|
|
$coupons = array(
|
|
|
'couponsUrl' => UserModel::getCouponData($uid),
|
...
|
...
|
@@ -188,16 +188,16 @@ class HomeController extends AbstractAction |
|
|
|
|
|
/**
|
|
|
* 我的消息
|
|
|
*
|
|
|
* 暂时使用老的,因后面APP、PC、WAP会进行一次改版
|
|
|
*/
|
|
|
public function messageAction()
|
|
|
{
|
|
|
$uid = $this->getUid();
|
|
|
$page = $this->get('page', 0);
|
|
|
$size = $this->get('size', 10);
|
|
|
|
|
|
$messages = UserModel::getMessageData($uid, $page, $size);
|
|
|
|
|
|
print_r($messages);
|
|
|
// $uid = $this->getUid();
|
|
|
// $page = $this->get('page', 0);
|
|
|
// $size = $this->get('size', 10);
|
|
|
//
|
|
|
// $messages = UserModel::getMessageData($uid, $page, $size);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -289,7 +289,9 @@ class HomeController extends AbstractAction |
|
|
}
|
|
|
}
|
|
|
|
|
|
//在线客服
|
|
|
/**
|
|
|
* 在线客服
|
|
|
*/
|
|
|
public function onlineServiceAction()
|
|
|
{
|
|
|
// 设置网站标题
|
...
|
...
|
@@ -305,7 +307,9 @@ class HomeController extends AbstractAction |
|
|
));
|
|
|
}
|
|
|
|
|
|
//在线客服-具体详情
|
|
|
/**
|
|
|
* 在线客服-具体详情
|
|
|
*/
|
|
|
public function onlineServiceDetailAction()
|
|
|
{
|
|
|
$service = array();
|
...
|
...
|
@@ -322,7 +326,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 我的逛
|
|
|
*/
|
|
|
public function myGuangAction()
|
|
|
public function myguangAction()
|
|
|
{
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 10);
|
...
|
...
|
@@ -331,7 +335,6 @@ class HomeController extends AbstractAction |
|
|
$yh_channel = Helpers::getChannelByCookie();
|
|
|
$guangInfo = \Home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit);
|
|
|
$totalPage = $guangInfo['totalPage'];
|
|
|
unset($guangInfo['totalPage']);
|
|
|
if ($page == 1) {
|
|
|
$this->setTitle('我收藏的');
|
|
|
$this->setNavHeader('我收藏的', true, '');
|
...
|
...
|
@@ -385,7 +388,7 @@ class HomeController extends AbstractAction |
|
|
'pageFooter' => true
|
|
|
);
|
|
|
|
|
|
$this->_view->display('suggest_sub', $data);
|
|
|
$this->_view->display('suggest-sub', $data);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -445,6 +448,7 @@ class HomeController extends AbstractAction |
|
|
$uid = $this->getUid();
|
|
|
$data = GradeModel::getGrade($gender, $channel, $uid);
|
|
|
$data['pageFooter'] = true;
|
|
|
|
|
|
$this->_view->display('vip-grade', $data);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -462,7 +466,7 @@ class HomeController extends AbstractAction |
|
|
$uid = $this->getUid();
|
|
|
$data = GradeModel::getPreferential($channel, $uid);
|
|
|
$data['pageFooter'] = true;
|
|
|
|
|
|
|
|
|
$this->_view->display('privilege', $data);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -489,7 +493,9 @@ class HomeController extends AbstractAction |
|
|
));
|
|
|
}
|
|
|
|
|
|
//ajax请求订单页面
|
|
|
/**
|
|
|
* ajax请求订单页面
|
|
|
*/
|
|
|
public function getOrdersAction()
|
|
|
{
|
|
|
//判断是不是ajax请求
|
...
|
...
|
@@ -527,10 +533,8 @@ class HomeController extends AbstractAction |
|
|
/*
|
|
|
* 我的订单-取消订单
|
|
|
*/
|
|
|
|
|
|
public function cancelOrderAction()
|
|
|
{
|
|
|
|
|
|
//判断是不是ajax请求
|
|
|
if (!$this->isAjax()) {
|
|
|
$this->error();
|
...
|
...
|
@@ -549,7 +553,6 @@ class HomeController extends AbstractAction |
|
|
/*
|
|
|
* 我的订单-删除订单
|
|
|
*/
|
|
|
|
|
|
public function delOrderAction()
|
|
|
{
|
|
|
//判断是不是ajax请求
|
...
|
...
|
@@ -570,7 +573,6 @@ class HomeController extends AbstractAction |
|
|
/*
|
|
|
* 我的订单-支付链接获取
|
|
|
*/
|
|
|
|
|
|
private function paymentAction()
|
|
|
{
|
|
|
$gender = Helpers::getGenderByCookie();
|
...
|
...
|
@@ -581,7 +583,6 @@ class HomeController extends AbstractAction |
|
|
/*
|
|
|
* 我的订单-随便逛逛链接获取
|
|
|
*/
|
|
|
|
|
|
private function strollAction()
|
|
|
{
|
|
|
//获取性别、频道数据
|
...
|
...
|
|