...
|
...
|
@@ -16,11 +16,11 @@ use Plugin\Helpers; |
|
|
*/
|
|
|
class HomeController extends AbstractAction
|
|
|
{
|
|
|
|
|
|
/**
|
|
|
* 个人中心入口
|
|
|
*/
|
|
|
public function indexAction()
|
|
|
{
|
|
|
public function indexAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('个人中心');
|
|
|
$this->setNavHeader('个人中心', true, SITE_MAIN);
|
...
|
...
|
@@ -44,11 +44,9 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 用户订单
|
|
|
*/
|
|
|
public function ordersAction()
|
|
|
{
|
|
|
public function ordersAction() {
|
|
|
// $uid = $this->getUid();
|
|
|
// $type = $this->get('type', 1);
|
|
|
|
|
|
// $orders = \Index\UserModel::getUserOrderData(967016, $type);
|
|
|
|
|
|
$order = array(
|
...
|
...
|
@@ -91,8 +89,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 用户收藏的商品
|
|
|
*/
|
|
|
public function favoriteAction()
|
|
|
{
|
|
|
public function favoriteAction() {
|
|
|
$uid = $this->getUid();
|
|
|
|
|
|
$favProducts = \Index\UserModel::getFavProductData($uid);
|
...
|
...
|
@@ -116,8 +113,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 用户收藏的品牌
|
|
|
*/
|
|
|
public function favoritebrandAction()
|
|
|
{
|
|
|
public function favoritebrandAction() {
|
|
|
$uid = $this->getUid();
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
|
...
|
...
|
@@ -129,8 +125,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 个人信息
|
|
|
*/
|
|
|
public function personalDetailsAction()
|
|
|
{
|
|
|
public function personalDetailsAction() {
|
|
|
$this->setTitle('个人信息');
|
|
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
|
|
|
...
|
...
|
@@ -139,15 +134,12 @@ class HomeController extends AbstractAction |
|
|
$data = \Index\UserModel::getUserProfileData($uid);
|
|
|
$data['pageFooter'] = true;
|
|
|
$this->_view->display('personal-details', $data);
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* YOHO币
|
|
|
*/
|
|
|
public function currencyAction()
|
|
|
{
|
|
|
public function currencyAction() {
|
|
|
// $uid = $this->getUid();
|
|
|
$this->setNavHeader('YOHO币', true, false);
|
|
|
|
...
|
...
|
@@ -160,8 +152,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 优惠券
|
|
|
*/
|
|
|
public function couponsAction()
|
|
|
{
|
|
|
public function couponsAction() {
|
|
|
|
|
|
$this->setTitle('优惠券');
|
|
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
...
|
...
|
@@ -173,14 +164,12 @@ class HomeController extends AbstractAction |
|
|
'couponsPage' => true
|
|
|
);
|
|
|
$this->_view->display('coupons', $coupons);
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 我的消息
|
|
|
*/
|
|
|
public function messageAction()
|
|
|
{
|
|
|
public function messageAction() {
|
|
|
// $uid = $this->getUid();
|
|
|
$page = $this->get('page', 0);
|
|
|
$size = $this->get('size', 10);
|
...
|
...
|
@@ -189,14 +178,12 @@ class HomeController extends AbstractAction |
|
|
$messages = \Index\UserModel::getMessageData($uid, $page, $size);
|
|
|
|
|
|
print_r($messages);
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 地址管理
|
|
|
*/
|
|
|
public function addressAction()
|
|
|
{
|
|
|
public function addressAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('地址管理');
|
|
|
$this->setNavHeader('地址管理', true, SITE_MAIN);
|
...
|
...
|
@@ -218,8 +205,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 修改地址
|
|
|
*/
|
|
|
public function editAddressAction()
|
|
|
{
|
|
|
public function editAddressAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('修改地址');
|
|
|
$this->setNavHeader('修改地址', true, SITE_MAIN);
|
...
|
...
|
@@ -241,8 +227,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 在线客服
|
|
|
*/
|
|
|
public function onlineServiceAction()
|
|
|
{
|
|
|
public function onlineServiceAction() {
|
|
|
$service = \Index\UserModel::getOnlineServiceData();
|
|
|
|
|
|
print_r($service);
|
...
|
...
|
@@ -251,16 +236,14 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 我的逛
|
|
|
*/
|
|
|
public function myGuangAction()
|
|
|
{
|
|
|
public function myGuangAction() {
|
|
|
echo 'My Guang';
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 意见反馈
|
|
|
*/
|
|
|
public function suggestAction()
|
|
|
{
|
|
|
public function suggestAction() {
|
|
|
$udid = $this->getUdid();
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 30);
|
...
|
...
|
@@ -297,15 +280,13 @@ class HomeController extends AbstractAction |
|
|
'bad' => false)
|
|
|
)
|
|
|
));
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 异步保存意见反馈数据
|
|
|
*/
|
|
|
public function savesuggestAction()
|
|
|
{
|
|
|
if($this->isAjax()) {
|
|
|
public function savesuggestAction() {
|
|
|
if ($this->isAjax()) {
|
|
|
$uid = $this->getUid();
|
|
|
$content = $this->post('content', '');
|
|
|
$suggest_type = $this->get('suggest_type', 2);
|
...
|
...
|
@@ -314,13 +295,12 @@ class HomeController extends AbstractAction |
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 会员等级展示页
|
|
|
*/
|
|
|
public function gradeAction(){
|
|
|
public function gradeAction() {
|
|
|
//设置网站seo信息
|
|
|
$this->setTitle('会员等级');
|
|
|
//显示网站导航头部信息
|
...
|
...
|
@@ -328,53 +308,57 @@ class HomeController extends AbstractAction |
|
|
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$uid = $this -> getUid();
|
|
|
$uid = '7566245';//临时测试用
|
|
|
$data = GradeModel::getGrade($gender,$channel,$uid);
|
|
|
$uid = $this->getUid();
|
|
|
$uid = '7566245'; //临时测试用
|
|
|
$data = GradeModel::getGrade($gender, $channel, $uid);
|
|
|
$data['pageFooter'] = true;
|
|
|
$this -> _view -> display('vip-grade',$data);
|
|
|
$this->_view->display('vip-grade', $data);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
*会员特权查看页
|
|
|
* 会员特权查看页
|
|
|
*/
|
|
|
public function preferentialAction(){
|
|
|
|
|
|
public function preferentialAction() {
|
|
|
//设置网站seo信息
|
|
|
$this->setTitle('会员等级');
|
|
|
//显示网站导航头部信息
|
|
|
$this->setNavHeader('会员特权详情');
|
|
|
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$uid = $this -> getUid();
|
|
|
$data = GradeModel::getPreferential($channel,$uid);
|
|
|
$uid = $this->getUid();
|
|
|
$data = GradeModel::getPreferential($channel, $uid);
|
|
|
$data['pageFooter'] = true;
|
|
|
$this -> _view -> display('privilege',$data);
|
|
|
$this->_view->display('privilege', $data);
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
*我的订单页面
|
|
|
* 我的订单页面
|
|
|
*/
|
|
|
public function orderAction(){
|
|
|
|
|
|
do{
|
|
|
//判断是不是ajax请求
|
|
|
public function orderAction() {
|
|
|
|
|
|
// do {
|
|
|
// //判断是不是ajax请求
|
|
|
// if(!$this -> isAjax()){
|
|
|
// break;
|
|
|
// }
|
|
|
//判断参数是否有效
|
|
|
$type = $this -> get('type',1);
|
|
|
$page = $this -> get('page',1);
|
|
|
$limit = $this -> get('limit',10);
|
|
|
$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();
|
|
|
if(!empty($type) && !is_numeric($type)){
|
|
|
$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);
|
|
|
$data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
|
|
|
print_r($data);
|
|
|
//} while (false);
|
|
|
//$this -> _view -> display('order',$data);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|