...
|
...
|
@@ -24,8 +24,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 初始化
|
|
|
*/
|
|
|
public function init()
|
|
|
{
|
|
|
public function init() {
|
|
|
// 检查用户是否登录, 未登录则跳转到登录页
|
|
|
$this->_uid = $this->getUid(false);
|
|
|
$action = $this->getRequest()->getActionName();
|
...
|
...
|
@@ -39,8 +38,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 个人中心入口
|
|
|
*/
|
|
|
public function indexAction()
|
|
|
{
|
|
|
public function indexAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('个人中心');
|
|
|
$this->setNavHeader('个人中心');
|
...
|
...
|
@@ -65,8 +63,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 用户收藏的商品
|
|
|
*/
|
|
|
public function favoriteAction()
|
|
|
{
|
|
|
public function favoriteAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('我的收藏');
|
|
|
$this->setNavHeader('我的收藏', true, SITE_MAIN);
|
...
|
...
|
@@ -96,8 +93,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 用户收藏的商品-删除
|
|
|
*/
|
|
|
public function favoriteDelAction()
|
|
|
{
|
|
|
public function favoriteDelAction() {
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
...
|
...
|
@@ -117,8 +113,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 个人信息
|
|
|
*/
|
|
|
public function personalDetailsAction()
|
|
|
{
|
|
|
public function personalDetailsAction() {
|
|
|
$this->setTitle('个人信息');
|
|
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
|
|
|
...
|
...
|
@@ -132,8 +127,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* YOHO币
|
|
|
*/
|
|
|
public function currencyAction()
|
|
|
{
|
|
|
public function currencyAction() {
|
|
|
$this->setTitle('YOHO币');
|
|
|
$this->setNavHeader('YOHO币', true, false);
|
|
|
|
...
|
...
|
@@ -147,8 +141,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 优惠券
|
|
|
*/
|
|
|
public function couponsAction()
|
|
|
{
|
|
|
public function couponsAction() {
|
|
|
$this->setTitle('优惠券');
|
|
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
|
|
...
|
...
|
@@ -168,8 +161,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 我的消息
|
|
|
*/
|
|
|
public function messageAction()
|
|
|
{
|
|
|
public function messageAction() {
|
|
|
$uid = $this->getUid();
|
|
|
$page = $this->get('page', 0);
|
|
|
$size = $this->get('size', 10);
|
...
|
...
|
@@ -182,8 +174,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 地址管理
|
|
|
*/
|
|
|
public function addressAction()
|
|
|
{
|
|
|
public function addressAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('地址管理');
|
|
|
$this->setNavHeader('地址管理');
|
...
|
...
|
@@ -203,8 +194,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 修改地址或者添加新地址
|
|
|
*/
|
|
|
public function saveAddressAction()
|
|
|
{
|
|
|
public function saveAddressAction() {
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
...
|
...
|
@@ -230,8 +220,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 设置默认地址
|
|
|
*/
|
|
|
public function defaultAddressAction()
|
|
|
{
|
|
|
public function defaultAddressAction() {
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
...
|
...
|
@@ -250,8 +239,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 删除地址
|
|
|
*/
|
|
|
public function delAddressAction()
|
|
|
{
|
|
|
public function delAddressAction() {
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
...
|
...
|
@@ -269,8 +257,7 @@ class HomeController extends AbstractAction |
|
|
}
|
|
|
|
|
|
//在线客服
|
|
|
public function onlineServiceAction()
|
|
|
{
|
|
|
public function onlineServiceAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('在线客服');
|
|
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
...
|
...
|
@@ -285,8 +272,7 @@ class HomeController extends AbstractAction |
|
|
}
|
|
|
|
|
|
//在线客服-具体详情
|
|
|
public function onlineServiceDetailAction()
|
|
|
{
|
|
|
public function onlineServiceDetailAction() {
|
|
|
$service = array();
|
|
|
$cateId = $this->get('cateId', 0);
|
|
|
$cateName = $this->get('cateName', '');
|
...
|
...
|
@@ -301,8 +287,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 我的逛
|
|
|
*/
|
|
|
public function myGuangAction()
|
|
|
{
|
|
|
public function myGuangAction() {
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 10);
|
|
|
$uid = $this->getUid();
|
...
|
...
|
@@ -325,8 +310,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 意见反馈
|
|
|
*/
|
|
|
public function suggestAction()
|
|
|
{
|
|
|
public function suggestAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('意见反馈');
|
|
|
$this->setNavHeader('意见反馈', true, SITE_MAIN);
|
...
|
...
|
@@ -348,8 +332,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 意见反馈-提交表单页面
|
|
|
*/
|
|
|
public function suggestSubAction()
|
|
|
{
|
|
|
public function suggestSubAction() {
|
|
|
// 设置网站标题
|
|
|
$this->setTitle('反馈问题');
|
|
|
|
...
|
...
|
@@ -370,8 +353,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 异步上传图片
|
|
|
*/
|
|
|
public function suggestimgUploadAction()
|
|
|
{
|
|
|
public function suggestimgUploadAction() {
|
|
|
//$filename = $this->post('filename', '');
|
|
|
$result = UserModel::saveSuggestImg('fileData');
|
|
|
|
...
|
...
|
@@ -381,8 +363,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 异步保存意见反馈数据
|
|
|
*/
|
|
|
public function savesuggestAction()
|
|
|
{
|
|
|
public function savesuggestAction() {
|
|
|
if ($this->isAjax()) {
|
|
|
$uid = $this->getUid();
|
|
|
$content = $this->post('content', '');
|
...
|
...
|
@@ -397,8 +378,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 异步点击靠谱或者不靠谱
|
|
|
*/
|
|
|
public function upAndDownAction()
|
|
|
{
|
|
|
public function upAndDownAction() {
|
|
|
if ($this->isAjax()) {
|
|
|
$uid = $this->getUid();
|
|
|
$udid = $this->getUdid();
|
...
|
...
|
@@ -412,8 +392,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 会员等级展示页
|
|
|
*/
|
|
|
public function gradeAction()
|
|
|
{
|
|
|
public function gradeAction() {
|
|
|
//设置网站seo信息
|
|
|
$this->setTitle('会员等级');
|
|
|
//显示网站导航头部信息
|
...
|
...
|
@@ -428,8 +407,8 @@ class HomeController extends AbstractAction |
|
|
/*
|
|
|
* 会员特权查看页
|
|
|
*/
|
|
|
public function preferentialAction()
|
|
|
{
|
|
|
|
|
|
public function preferentialAction() {
|
|
|
//设置网站seo信息
|
|
|
$this->setTitle('会员等级');
|
|
|
//显示网站导航头部信息
|
...
|
...
|
@@ -443,8 +422,8 @@ class HomeController extends AbstractAction |
|
|
/*
|
|
|
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
|
|
|
*/
|
|
|
public function orderAction()
|
|
|
{
|
|
|
|
|
|
public function orderAction() {
|
|
|
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论。
|
|
|
$type = $this->get('type', 1);
|
|
|
$this->setTitle('我的订单');
|
...
|
...
|
@@ -464,17 +443,17 @@ class HomeController extends AbstractAction |
|
|
}
|
|
|
|
|
|
//ajax请求订单页面
|
|
|
public function getOrdersAction()
|
|
|
{
|
|
|
public function getOrdersAction() {
|
|
|
//判断是不是ajax请求
|
|
|
if (!$this->isAjax()) {
|
|
|
$this->error();
|
|
|
}
|
|
|
//获取基本参数:type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
|
|
|
//获取基本参数:type 1:全部 2:待付款 3:待发货 4:待收货 5:待评论 7:失败 取消 订单
|
|
|
$type = $this->get('type', 1);
|
|
|
$page = $this->get('page', 1);
|
|
|
$limit = $this->get('limit', 10);
|
|
|
$uid = $this->getUid();
|
|
|
$uid = '12';//测试数据
|
|
|
//调用模型层getOrder方法获得并处理数据
|
|
|
$data = OrderModel::getOrder($type, $page, $limit, $uid);
|
|
|
/* 如果取不到订单数据时,分两种情况:
|
...
|
...
|
@@ -499,8 +478,7 @@ class HomeController extends AbstractAction |
|
|
* 我的订单-取消订单
|
|
|
*/
|
|
|
|
|
|
public function cancelOrderAction()
|
|
|
{
|
|
|
public function cancelOrderAction() {
|
|
|
|
|
|
//判断是不是ajax请求
|
|
|
if (!$this->isAjax()) {
|
...
|
...
|
@@ -522,8 +500,7 @@ class HomeController extends AbstractAction |
|
|
* 我的订单-删除订单
|
|
|
*/
|
|
|
|
|
|
public function delOrderAction()
|
|
|
{
|
|
|
public function delOrderAction() {
|
|
|
//判断是不是ajax请求
|
|
|
if (!$this->isAjax()) {
|
|
|
$this->error();
|
...
|
...
|
@@ -544,8 +521,7 @@ class HomeController extends AbstractAction |
|
|
* 我的订单-支付链接获取
|
|
|
*/
|
|
|
|
|
|
private function paymentAction()
|
|
|
{
|
|
|
private function paymentAction() {
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$yh_channel = $this->get('yh_channel', 1);
|
|
|
OrderModel::payment($gender, $yh_channel);
|
...
|
...
|
@@ -555,8 +531,7 @@ class HomeController extends AbstractAction |
|
|
* 我的订单-随便逛逛链接获取
|
|
|
*/
|
|
|
|
|
|
private function strollAction()
|
|
|
{
|
|
|
private function strollAction() {
|
|
|
//获取性别、频道数据
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$yh_channel = $this->get('yh_channel', 1);
|
...
|
...
|
@@ -568,8 +543,7 @@ class HomeController extends AbstractAction |
|
|
/**
|
|
|
* 订单详情页
|
|
|
*/
|
|
|
public function orderDetailAction()
|
|
|
{
|
|
|
public function orderDetailAction() {
|
|
|
$data = array(
|
|
|
'name' => '毛毛莉Lydia',
|
|
|
'phoneNum' => '18600001133',
|
...
|
...
|
|