Authored by 周少峰

搜索页添加是否搜索店铺信息判断

@@ -102,9 +102,6 @@ class SearchModel @@ -102,9 +102,6 @@ class SearchModel
102 if (!isset($condition['order']) || empty($condition['order'])) { 102 if (!isset($condition['order']) || empty($condition['order'])) {
103 $condition['order'] = 's_n_desc'; 103 $condition['order'] = 's_n_desc';
104 } 104 }
105 - if (!isset($condition['p_d']) || empty($condition['p_d'])) {  
106 - $condition['p_d'] = '0,0.9';  
107 - }  
108 $options = array( 105 $options = array(
109 'imgSize' => $imgSize, 106 'imgSize' => $imgSize,
110 'minImgSize' => $minImgSize, 107 'minImgSize' => $minImgSize,
@@ -168,8 +165,10 @@ class SearchModel @@ -168,8 +165,10 @@ class SearchModel
168 // 组合搜索分类url 165 // 组合搜索分类url
169 $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); 166 $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']);
170 // 组合搜索店铺url 167 // 组合搜索店铺url
171 - $param['keyword'] = $searchCondition['condition']['query'];  
172 - $urlList['shop'] = HelperSearch::getShopUrl($param); 168 + if (isset($param['keyword'])) {
  169 + $param['keyword'] = $searchCondition['condition']['query'];
  170 + $urlList['shop'] = HelperSearch::getShopUrl($param);
  171 + }
173 //用户浏览记录 172 //用户浏览记录
174 //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); 173 //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
175 $result = Yohobuy::getMulti($urlList, array(), true); 174 $result = Yohobuy::getMulti($urlList, array(), true);
@@ -17,7 +17,11 @@ class ListController extends WebAction @@ -17,7 +17,11 @@ class ListController extends WebAction
17 */ 17 */
18 public function saleAction() 18 public function saleAction()
19 { 19 {
20 - $list = SearchModel::getListData(); 20 + //排序
  21 + $condition['order'] = 's_n_desc';
  22 + //打折
  23 + $condition['p_d'] = '0,0.9';
  24 + $list = SearchModel::getListData($condition);
21 $data = array( 25 $data = array(
22 //初始化js 26 //初始化js
23 'productListPage' => true, 27 'productListPage' => true,