Authored by Lynnic

update

{
"name": "yohobuy",
"version": "1.1.9a",
"version": "1.2.0",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
... ...
... ... @@ -88,7 +88,7 @@ a {
}
.yoho-tip {
position: absolute;
position: fixed;
display: none;
text-align: center;
width: 70%;
... ...
<?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;
}
... ...
<?php
namespace home;
namespace Home;
use LibModels\Wap\Home\OrderData;
use Plugin\Helpers;
use Plugin\Cache;
use Configs\CacheConfig;
/*
... ...
... ... @@ -5,7 +5,7 @@ define('SITE_MAIN', 'http://buy.test.yoho.cn'); // 网站主域名
define('OLD_MAIN', 'http://m.yohobuy.com'); // 网站旧域名
define('COOKIE_DOMAIN', '.test.yoho.cn'); // COOKIE作用域
define('SUB_DOMAIN', '.test.yoho.cn'); // 子域名后缀
define('USE_CACHE', true); // 缓存的开关
define('USE_CACHE', false); // 缓存的开关
define('APPLICATION_PATH', dirname(__DIR__)); // 应用目录
define('ROOT_PATH', dirname(dirname(APPLICATION_PATH))); // 根目录
defined('APPLICATION_ENV') || define('APPLICATION_ENV', 'testing');
... ...