Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
6 changed files
with
19 additions
and
20 deletions
@@ -4,9 +4,6 @@ namespace WebPlugin; | @@ -4,9 +4,6 @@ namespace WebPlugin; | ||
4 | 4 | ||
5 | use WebPlugin\Paging; | 5 | use WebPlugin\Paging; |
6 | use LibModels\Web\Product\BrandData; | 6 | use LibModels\Web\Product\BrandData; |
7 | -use LibModels\Web\Product\SearchData; | ||
8 | -use Api\Yohobuy; | ||
9 | -use Api\Sign; | ||
10 | use Configs\ChannelConfig; | 7 | use Configs\ChannelConfig; |
11 | use Index\HomeModel; | 8 | use Index\HomeModel; |
12 | /** | 9 | /** |
@@ -317,7 +314,7 @@ class HelperSearch | @@ -317,7 +314,7 @@ class HelperSearch | ||
317 | 314 | ||
318 | foreach ($sort as $key => $val) { | 315 | foreach ($sort as $key => $val) { |
319 | //是否有品牌 | 316 | //是否有品牌 |
320 | - if ($options['action'] != 'brand' && $options['controller'] != 'index') { | 317 | + if ($options['action'] != 'brand' && $options['controller'] != 'Index') { |
321 | //若url参数有分类,设置msort导航 | 318 | //若url参数有分类,设置msort导航 |
322 | if (isset(self::$params['msort']) && self::$params['msort'] == $val['sort_id']) { | 319 | if (isset(self::$params['msort']) && self::$params['msort'] == $val['sort_id']) { |
323 | self::$listNav[1] = array( | 320 | self::$listNav[1] = array( |
@@ -1299,7 +1296,7 @@ class HelperSearch | @@ -1299,7 +1296,7 @@ class HelperSearch | ||
1299 | $type = isset(self::$params['msort']) && self::$params['msort'] ? self::$params['msort'] : ''; | 1296 | $type = isset(self::$params['msort']) && self::$params['msort'] ? self::$params['msort'] : ''; |
1300 | } | 1297 | } |
1301 | //新品到着 | 1298 | //新品到着 |
1302 | - elseif ($controller == 'list' && $action == 'new') { | 1299 | + elseif ($controller == 'List' && $action == 'new') { |
1303 | if (isset(self::$params['shelve_time'])) { | 1300 | if (isset(self::$params['shelve_time'])) { |
1304 | $date = explode(',', self::$params['shelve_time']); | 1301 | $date = explode(',', self::$params['shelve_time']); |
1305 | $date = date('Y-m-d', $date[0]); | 1302 | $date = date('Y-m-d', $date[0]); |
@@ -24,8 +24,6 @@ class NewModel | @@ -24,8 +24,6 @@ class NewModel | ||
24 | $urlList['sort'] = SearchData::getClassesUrl($searchCondition['sortCondition']); | 24 | $urlList['sort'] = SearchData::getClassesUrl($searchCondition['sortCondition']); |
25 | // 组合搜索最新上架url | 25 | // 组合搜索最新上架url |
26 | $urlList['recent'] = SearchData::getRecentShelveUrl($searchCondition['condition']); | 26 | $urlList['recent'] = SearchData::getRecentShelveUrl($searchCondition['condition']); |
27 | - //用户浏览记录 | ||
28 | - //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); | ||
29 | 27 | ||
30 | $result = Yohobuy::getMulti($urlList, array(), true); | 28 | $result = Yohobuy::getMulti($urlList, array(), true); |
31 | // 组织模板数据 | 29 | // 组织模板数据 |
@@ -102,8 +102,13 @@ class SearchModel | @@ -102,8 +102,13 @@ class SearchModel | ||
102 | $condition['attribute_not'] = 2; | 102 | $condition['attribute_not'] = 2; |
103 | //默认排序 | 103 | //默认排序 |
104 | if (!isset($condition['order']) || empty($condition['order'])) { | 104 | if (!isset($condition['order']) || empty($condition['order'])) { |
105 | + //如果新品到着没传排序方式,默认按s_t_desc(新品)顺序排序 | ||
106 | + if ($option['controller'] == 'List' && $option['action'] == 'new') { | ||
107 | + $condition['order'] = 's_t_desc'; | ||
108 | + }else{ | ||
105 | $condition['order'] = 's_n_desc'; | 109 | $condition['order'] = 's_n_desc'; |
106 | } | 110 | } |
111 | + } | ||
107 | $options = array( | 112 | $options = array( |
108 | 'imgSize' => $imgSize, | 113 | 'imgSize' => $imgSize, |
109 | 'minImgSize' => $minImgSize, | 114 | 'minImgSize' => $minImgSize, |
@@ -44,7 +44,7 @@ class IndexController extends WebAction | @@ -44,7 +44,7 @@ class IndexController extends WebAction | ||
44 | $options['brandNameEn'] = isset($result['brandNameEn']) ? $result['brandNameEn'] : ''; | 44 | $options['brandNameEn'] = isset($result['brandNameEn']) ? $result['brandNameEn'] : ''; |
45 | $options['brandNameCn'] = isset($result['brandNameCn']) ? $result['brandNameCn'] : ''; | 45 | $options['brandNameCn'] = isset($result['brandNameCn']) ? $result['brandNameCn'] : ''; |
46 | $options['reviewNum'] = 6; | 46 | $options['reviewNum'] = 6; |
47 | - $options['controller'] = 'index'; | 47 | + $options['controller'] = 'Index'; |
48 | $options['action'] = 'brand'; | 48 | $options['action'] = 'brand'; |
49 | 49 | ||
50 | //调用模型获得数据 | 50 | //调用模型获得数据 |
@@ -90,10 +90,10 @@ class IndexController extends WebAction | @@ -90,10 +90,10 @@ class IndexController extends WebAction | ||
90 | $options['brandId'] = isset($result['brandId']) ? $result['brandId'] : ''; | 90 | $options['brandId'] = isset($result['brandId']) ? $result['brandId'] : ''; |
91 | $options['brandBanner'] = isset($result['brandBanner']) ? $result['brandBanner'] : ''; | 91 | $options['brandBanner'] = isset($result['brandBanner']) ? $result['brandBanner'] : ''; |
92 | $options['brandAbout'] = isset($result['brandAbout']) ? $result['brandAbout'] : ''; | 92 | $options['brandAbout'] = isset($result['brandAbout']) ? $result['brandAbout'] : ''; |
93 | - $options['controller'] = $this->_request->controller; | ||
94 | - $options['action'] = $this->_request->action; | 93 | + $options['controller'] = 'Index'; |
94 | + $options['action'] = 'brand'; | ||
95 | //调用模型获得数据 | 95 | //调用模型获得数据 |
96 | - $data = Product\BrandsModel::getBrandIntro($condition, $options); | 96 | + $data = BrandsModel::getBrandIntro($condition, $options); |
97 | 97 | ||
98 | $data = array( | 98 | $data = array( |
99 | //初始化js | 99 | //初始化js |
@@ -15,8 +15,8 @@ class ListController extends WebAction | @@ -15,8 +15,8 @@ class ListController extends WebAction | ||
15 | $options = array( | 15 | $options = array( |
16 | 'positionId' => $positionId, | 16 | 'positionId' => $positionId, |
17 | 'reviewNum' => 6, | 17 | 'reviewNum' => 6, |
18 | - 'controller' => $this->_request->controller,//TODO | ||
19 | - 'action' => $this->_request->action | 18 | + 'controller' => 'List', |
19 | + 'action' => 'index' | ||
20 | ); | 20 | ); |
21 | 21 | ||
22 | $indexData = IndexModel::getIndexData($condition, $options); | 22 | $indexData = IndexModel::getIndexData($condition, $options); |
@@ -35,12 +35,10 @@ class ListController extends WebAction | @@ -35,12 +35,10 @@ class ListController extends WebAction | ||
35 | */ | 35 | */ |
36 | public function newAction() | 36 | public function newAction() |
37 | { | 37 | { |
38 | - $condition = array( | ||
39 | - 'order' => 's_t_desc' | ||
40 | - ); | 38 | + $condition = array(); |
41 | $options = array( | 39 | $options = array( |
42 | 'reviewNum' => 6, | 40 | 'reviewNum' => 6, |
43 | - 'controller' => 'list', | 41 | + 'controller' => 'List', |
44 | 'action' => 'new' | 42 | 'action' => 'new' |
45 | ); | 43 | ); |
46 | 44 | ||
@@ -64,7 +62,7 @@ class ListController extends WebAction | @@ -64,7 +62,7 @@ class ListController extends WebAction | ||
64 | $options['reviewNum'] = 6; | 62 | $options['reviewNum'] = 6; |
65 | $condition = array(); | 63 | $condition = array(); |
66 | $option = array( | 64 | $option = array( |
67 | - 'controller' => 'list', | 65 | + 'controller' => 'List', |
68 | 'action' => 'sale', | 66 | 'action' => 'sale', |
69 | 'reviewNum'=>6 | 67 | 'reviewNum'=>6 |
70 | ); | 68 | ); |
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | 2 | ||
3 | use Action\WebAction; | 3 | use Action\WebAction; |
4 | use LibModels\Web\Product\SaleData; | 4 | use LibModels\Web\Product\SaleData; |
5 | +use Product\SaleModel; | ||
5 | 6 | ||
6 | /** | 7 | /** |
7 | * sale页 | 8 | * sale页 |
@@ -43,12 +44,12 @@ class SaleController extends WebAction | @@ -43,12 +44,12 @@ class SaleController extends WebAction | ||
43 | } | 44 | } |
44 | 45 | ||
45 | $options = array( | 46 | $options = array( |
46 | - 'controller' => 'sale', | 47 | + 'controller' => 'Sale', |
47 | 'action' => 'index', | 48 | 'action' => 'index', |
48 | 'reviewNum' => 6 | 49 | 'reviewNum' => 6 |
49 | ); | 50 | ); |
50 | 51 | ||
51 | - $saleData = Product\SaleModel::getSaleSearchData($condition, $options, $specialInfo); | 52 | + $saleData = SaleModel::getSaleSearchData($condition, $options, $specialInfo); |
52 | 53 | ||
53 | $data = array( | 54 | $data = array( |
54 | //初始化js | 55 | //初始化js |
-
Please register or login to post a comment