|
|
<?php
|
|
|
|
|
|
use Action\AbstractAction;
|
|
|
use home\GradeModel;
|
|
|
use home\OrderModel;
|
|
|
use Plugin\Helpers;
|
|
|
use LibModels\Wap\Home\OrderData;
|
|
|
|
...
|
...
|
@@ -272,7 +270,7 @@ class HomeController extends AbstractAction |
|
|
$this->setTitle('在线客服');
|
|
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
|
|
|
|
|
$service = home\OnlineModel::getOnlineServiceInfo();
|
|
|
$service = Home\OnlineModel::getOnlineServiceInfo();
|
|
|
|
|
|
$this->_view->display('online-service', array(
|
|
|
'onlineServicePage' => true,
|
...
|
...
|
@@ -288,7 +286,7 @@ class HomeController extends AbstractAction |
|
|
$cateId = $this->get('cateId', 0);
|
|
|
$cateName = $this->get('cateName', '');
|
|
|
if ($cateId > 0) {
|
|
|
$service = home\OnlineModel::getOnlineServiceDetail($cateId);
|
|
|
$service = Home\OnlineModel::getOnlineServiceDetail($cateId);
|
|
|
}
|
|
|
$this->setTitle('在线客服');
|
|
|
$this->setNavHeader($cateName, true, '');
|
...
|
...
|
@@ -305,7 +303,7 @@ class HomeController extends AbstractAction |
|
|
$uid = $this->getUid();
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$yh_channel = Helpers::getChannelByCookie();
|
|
|
$guangInfo = \home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit);
|
|
|
$guangInfo = \Home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit);
|
|
|
$totalPage = $guangInfo['totalPage'];
|
|
|
unset($guangInfo['totalPage']);
|
|
|
if ($page == 1) {
|
...
|
...
|
@@ -419,7 +417,7 @@ class HomeController extends AbstractAction |
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$uid = $this->getUid();
|
|
|
$data = GradeModel::getGrade($gender, $channel, $uid);
|
|
|
$data = \Home\GradeModel::getGrade($gender, $channel, $uid);
|
|
|
$data['pageFooter'] = true;
|
|
|
$this->_view->display('vip-grade', $data);
|
|
|
}
|
...
|
...
|
@@ -427,7 +425,6 @@ class HomeController extends AbstractAction |
|
|
/*
|
|
|
* 会员特权查看页
|
|
|
*/
|
|
|
|
|
|
public function preferentialAction()
|
|
|
{
|
|
|
//设置网站seo信息
|
...
|
...
|
@@ -437,22 +434,22 @@ class HomeController extends AbstractAction |
|
|
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$uid = $this->getUid();
|
|
|
$data = GradeModel::getPreferential($channel, $uid);
|
|
|
$data = \Home\GradeModel::getPreferential($channel, $uid);
|
|
|
$data['pageFooter'] = true;
|
|
|
|
|
|
$this->_view->display('privilege', $data);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
|
|
|
*/
|
|
|
|
|
|
public function orderAction()
|
|
|
{
|
|
|
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论。
|
|
|
$type = $this->get('type', 1);
|
|
|
$this->setTitle('我的订单');
|
|
|
$this->setNavHeader('我的订单');
|
|
|
$data = OrderModel::getNavs($type);
|
|
|
$data = \Home\OrderModel::getNavs($type);
|
|
|
if (!empty($data)) {
|
|
|
$order['navs'] = $data;
|
|
|
} else {
|
...
|
...
|
@@ -481,7 +478,7 @@ class HomeController extends AbstractAction |
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
$uid = $this->getUid();
|
|
|
//调用模型层getOrder方法获得并处理数据
|
|
|
$data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
|
|
|
$data = \Home\OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
|
|
|
/* 如果取不到订单数据时,分两种情况:
|
|
|
1、page>1时,echo一个空格字符串到浏览器。
|
|
|
2、page=1时,就给一个随便逛逛的链接。
|
...
|
...
|
@@ -518,7 +515,7 @@ class HomeController extends AbstractAction |
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
$method = 'app.SpaceOrders.close';
|
|
|
//调用取消订单接口,返回订单取消状态
|
|
|
$data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
|
|
$data = \Home\OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
|
|
//将取消状态返回至浏览器
|
|
|
$this->echoJson($data);
|
|
|
}
|
...
|
...
|
@@ -540,7 +537,7 @@ class HomeController extends AbstractAction |
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
$method = 'app.SpaceOrders.delOrderByCode';
|
|
|
//调用接口删除订单,并返回订单删除状态
|
|
|
$data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
|
|
$data = \Home\OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
|
|
//将订单删除状态返回至浏览器
|
|
|
$this->echoJson($data);
|
|
|
}
|
...
|
...
|
@@ -553,7 +550,7 @@ class HomeController extends AbstractAction |
|
|
{
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
OrderModel::payment($gender, $yh_channel);
|
|
|
\Home\OrderModel::payment($gender, $yh_channel);
|
|
|
}
|
|
|
|
|
|
/*
|
...
|
...
|
@@ -566,7 +563,7 @@ class HomeController extends AbstractAction |
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
//调用接口获取随便逛逛url地址,并return数据
|
|
|
$data = OrderModel::stroll($gender, $yh_channel);
|
|
|
$data = \Home\OrderModel::stroll($gender, $yh_channel);
|
|
|
return $data;
|
|
|
}
|
|
|
|
...
|
...
|
|