Authored by whb

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -4,9 +4,6 @@ namespace WebPlugin;
use WebPlugin\Paging;
use LibModels\Web\Product\BrandData;
use LibModels\Web\Product\SearchData;
use Api\Yohobuy;
use Api\Sign;
use Configs\ChannelConfig;
use Index\HomeModel;
/**
... ... @@ -317,7 +314,7 @@ class HelperSearch
foreach ($sort as $key => $val) {
//是否有品牌
if ($options['action'] != 'brand' && $options['controller'] != 'index') {
if ($options['action'] != 'brand' && $options['controller'] != 'Index') {
//若url参数有分类,设置msort导航
if (isset(self::$params['msort']) && self::$params['msort'] == $val['sort_id']) {
self::$listNav[1] = array(
... ... @@ -1299,7 +1296,7 @@ class HelperSearch
$type = isset(self::$params['msort']) && self::$params['msort'] ? self::$params['msort'] : '';
}
//新品到着
elseif ($controller == 'list' && $action == 'new') {
elseif ($controller == 'List' && $action == 'new') {
if (isset(self::$params['shelve_time'])) {
$date = explode(',', self::$params['shelve_time']);
$date = date('Y-m-d', $date[0]);
... ...
... ... @@ -24,8 +24,6 @@ class NewModel
$urlList['sort'] = SearchData::getClassesUrl($searchCondition['sortCondition']);
// 组合搜索最新上架url
$urlList['recent'] = SearchData::getRecentShelveUrl($searchCondition['condition']);
//用户浏览记录
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
$result = Yohobuy::getMulti($urlList, array(), true);
// 组织模板数据
... ...
... ... @@ -102,8 +102,13 @@ class SearchModel
$condition['attribute_not'] = 2;
//默认排序
if (!isset($condition['order']) || empty($condition['order'])) {
//如果新品到着没传排序方式,默认按s_t_desc(新品)顺序排序
if ($option['controller'] == 'List' && $option['action'] == 'new') {
$condition['order'] = 's_t_desc';
}else{
$condition['order'] = 's_n_desc';
}
}
$options = array(
'imgSize' => $imgSize,
'minImgSize' => $minImgSize,
... ...
... ... @@ -44,7 +44,7 @@ class IndexController extends WebAction
$options['brandNameEn'] = isset($result['brandNameEn']) ? $result['brandNameEn'] : '';
$options['brandNameCn'] = isset($result['brandNameCn']) ? $result['brandNameCn'] : '';
$options['reviewNum'] = 6;
$options['controller'] = 'index';
$options['controller'] = 'Index';
$options['action'] = 'brand';
//调用模型获得数据
... ... @@ -90,10 +90,10 @@ class IndexController extends WebAction
$options['brandId'] = isset($result['brandId']) ? $result['brandId'] : '';
$options['brandBanner'] = isset($result['brandBanner']) ? $result['brandBanner'] : '';
$options['brandAbout'] = isset($result['brandAbout']) ? $result['brandAbout'] : '';
$options['controller'] = $this->_request->controller;
$options['action'] = $this->_request->action;
$options['controller'] = 'Index';
$options['action'] = 'brand';
//调用模型获得数据
$data = Product\BrandsModel::getBrandIntro($condition, $options);
$data = BrandsModel::getBrandIntro($condition, $options);
$data = array(
//初始化js
... ...
... ... @@ -15,8 +15,8 @@ class ListController extends WebAction
$options = array(
'positionId' => $positionId,
'reviewNum' => 6,
'controller' => $this->_request->controller,//TODO
'action' => $this->_request->action
'controller' => 'List',
'action' => 'index'
);
$indexData = IndexModel::getIndexData($condition, $options);
... ... @@ -35,12 +35,10 @@ class ListController extends WebAction
*/
public function newAction()
{
$condition = array(
'order' => 's_t_desc'
);
$condition = array();
$options = array(
'reviewNum' => 6,
'controller' => 'list',
'controller' => 'List',
'action' => 'new'
);
... ... @@ -64,7 +62,7 @@ class ListController extends WebAction
$options['reviewNum'] = 6;
$condition = array();
$option = array(
'controller' => 'list',
'controller' => 'List',
'action' => 'sale',
'reviewNum'=>6
);
... ...
... ... @@ -2,6 +2,7 @@
use Action\WebAction;
use LibModels\Web\Product\SaleData;
use Product\SaleModel;
/**
* sale页
... ... @@ -43,12 +44,12 @@ class SaleController extends WebAction
}
$options = array(
'controller' => 'sale',
'controller' => 'Sale',
'action' => 'index',
'reviewNum' => 6
);
$saleData = Product\SaleModel::getSaleSearchData($condition, $options, $specialInfo);
$saleData = SaleModel::getSaleSearchData($condition, $options, $specialInfo);
$data = array(
//初始化js
... ...