...
|
...
|
@@ -155,16 +155,16 @@ class HomeController extends AbstractAction |
|
|
public function couponsAction() {
|
|
|
|
|
|
$this->setTitle('优惠券');
|
|
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
|
// $uid = $this->getUid();
|
|
|
$uid = 8826435;
|
|
|
$status = $this->get('status', 0);
|
|
|
$coupons = array(
|
|
|
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
|
|
|
'couponsPage' => true
|
|
|
);
|
|
|
|
|
|
print_r($coupons);
|
|
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
|
// $uid = $this->getUid();
|
|
|
$uid = 8826435;
|
|
|
$status = $this->get('status', 0);
|
|
|
$coupons = array(
|
|
|
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
|
|
|
'couponsPage' => true
|
|
|
);
|
|
|
|
|
|
print_r($coupons);
|
|
|
$this->_view->display('coupons', $coupons);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -227,8 +227,7 @@ class HomeController extends AbstractAction |
|
|
}
|
|
|
|
|
|
//在线客服
|
|
|
public function onlineServiceAction()
|
|
|
{
|
|
|
public function onlineServiceAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('在线客服');
|
|
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
...
|
...
|
@@ -243,37 +242,33 @@ class HomeController extends AbstractAction |
|
|
}
|
|
|
|
|
|
//在线客服-具体详情
|
|
|
public function onlineServiceDetailAction()
|
|
|
{
|
|
|
public function onlineServiceDetailAction() {
|
|
|
$service = array();
|
|
|
$cateId = $this->get('cateId', 0);
|
|
|
if ($cateId > 0)
|
|
|
{
|
|
|
if ($cateId > 0) {
|
|
|
$service = home\OnlineModel::getOnlineServiceDetail($cateId);
|
|
|
}
|
|
|
$this->_view->display('online_service_detail', $service);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 我的逛
|
|
|
*/
|
|
|
public function myGuangAction()
|
|
|
{
|
|
|
echo 'My Guang';
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 意见反馈
|
|
|
*/
|
|
|
public function suggestAction()
|
|
|
{
|
|
|
$udid = $this->getUdid();
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 30);
|
|
|
|
|
|
$suggest = \Index\UserModel::getSuggestData($udid, $page, $limit);
|
|
|
|
|
|
//print_r($suggest);
|
|
|
* 我的逛
|
|
|
*/
|
|
|
public function myGuangAction() {
|
|
|
echo 'My Guang';
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 意见反馈
|
|
|
*/
|
|
|
public function suggestAction() {
|
|
|
$udid = $this->getUdid();
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 30);
|
|
|
|
|
|
$suggest = \Index\UserModel::getSuggestData($udid, $page, $limit);
|
|
|
|
|
|
//print_r($suggest);
|
|
|
$this->_view->display('suggest', array(
|
|
|
'suggestPage' => true,
|
|
|
'pageHeader' => array(
|
...
|
...
|
@@ -360,28 +355,35 @@ class HomeController extends AbstractAction |
|
|
*/
|
|
|
|
|
|
public function orderAction() {
|
|
|
//获取基本参数:type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
|
|
|
$type = $this->get('type', 1);
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 10);
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
$uid = $this->getUid();
|
|
|
$uid = '7566245'; //测试用
|
|
|
//调用模型层getOrder方法获得并处理数据
|
|
|
$data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
|
|
|
//渲染模板
|
|
|
$this->_view->display('order', array(
|
|
|
'order' => array(
|
|
|
'orders' => $data
|
|
|
)
|
|
|
));
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
* 我的订单-处理ajax请求页面(切换订单状态)
|
|
|
*/
|
|
|
|
|
|
public function orderAjaxAction() {
|
|
|
|
|
|
// do {
|
|
|
// //判断是不是ajax请求
|
|
|
// if(!$this -> isAjax()){
|
|
|
// break;
|
|
|
// }
|
|
|
//判断参数是否有效
|
|
|
$type = $this->get('type', 1);
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 10);
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
//$uid = $this->getUid();
|
|
|
$uid = '7566245';
|
|
|
if (!empty($type) && !is_numeric($type)) {
|
|
|
break;
|
|
|
}
|
|
|
//$data = OrderModel::getOrder();
|
|
|
$data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
|
|
|
print_r($data);
|
|
|
//} while (false);
|
|
|
//$this -> _view -> display('order',$data);
|
|
|
//判断是不是ajax请求
|
|
|
if (!$this->isAjax()) {
|
|
|
$this->error();
|
|
|
}
|
|
|
self::orderAction();
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|