Authored by wangqing

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

@@ -249,7 +249,7 @@ class SearchData extends \LibModels\Wap\Product\SearchData @@ -249,7 +249,7 @@ class SearchData extends \LibModels\Wap\Product\SearchData
249 if (!isset($condition['order'])) { 249 if (!isset($condition['order'])) {
250 $param['order'] = $orderMaps['s_t_desc']; 250 $param['order'] = $orderMaps['s_t_desc'];
251 } else { 251 } else {
252 - $param['order'] = $orderMaps[$condition['order']]; 252 + $param['order'] = isset($orderMaps[$condition['order']]) ? $orderMaps[$condition['order']] : '';
253 } 253 }
254 if (!isset($condition['page'])) { 254 if (!isset($condition['page'])) {
255 $param['page'] = 1; 255 $param['page'] = 1;
@@ -79,7 +79,7 @@ class HelperSearch @@ -79,7 +79,7 @@ class HelperSearch
79 //总页数 79 //总页数
80 $result['page_total'] = isset($data['product']['page_total']) ? $data['product']['page_total'] : ''; 80 $result['page_total'] = isset($data['product']['page_total']) ? $data['product']['page_total'] : '';
81 self::$pageTotal = $result['page_total']; 81 self::$pageTotal = $result['page_total'];
82 - self::$total = $data['product']['total']; 82 + self::$total = isset($data['product']['total']) ? $data['product']['total'] : 0;
83 //当前页 83 //当前页
84 self::$page = $result['page'] = isset($data['product']['page']) ? $data['product']['page'] : ''; 84 self::$page = $result['page'] = isset($data['product']['page']) ? $data['product']['page'] : '';
85 //筛选条件 85 //筛选条件
@@ -36,14 +36,15 @@ class IndexModel @@ -36,14 +36,15 @@ class IndexModel
36 $misort = isset($searchCondition['condition']['misort']) ? $searchCondition['condition']['misort'] : false; 36 $misort = isset($searchCondition['condition']['misort']) ? $searchCondition['condition']['misort'] : false;
37 $positionId = isset($searchCondition['options']['positionId']) ? $searchCondition['options']['positionId'] : ''; 37 $positionId = isset($searchCondition['options']['positionId']) ? $searchCondition['options']['positionId'] : '';
38 $gender = $searchCondition['condition']['gender'] == '2,3' ? 2 : 1; 38 $gender = $searchCondition['condition']['gender'] == '2,3' ? 2 : 1;
39 - if ($msort && $misort) {//TODO 39 + $banner = array();
  40 + if ($msort && $misort) {
40 $bannerData = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_INDEX_TBANNER, 'get', array($positionId,$msort,$misort,$gender,0,0,0,0,0)); 41 $bannerData = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_INDEX_TBANNER, 'get', array($positionId,$msort,$misort,$gender,0,0,0,0,0));
41 if (isset($bannerData['code']) && $bannerData['code'] == '200') { 42 if (isset($bannerData['code']) && $bannerData['code'] == '200') {
42 $banner = self::formatBanner($bannerData['data']); 43 $banner = self::formatBanner($bannerData['data']);
43 } 44 }
44 } 45 }
45 //插入banner数据 46 //插入banner数据
46 - if (!empty($banner)) { 47 + if (isset($banner)) {
47 $data['sortIntro'] = $banner; 48 $data['sortIntro'] = $banner;
48 } 49 }
49 50
@@ -16,6 +16,9 @@ class SearchController extends WebAction @@ -16,6 +16,9 @@ class SearchController extends WebAction
16 'searchListPage' => true, 16 'searchListPage' => true,
17 'search' => $searchData 17 'search' => $searchData
18 ); 18 );
  19 + $this->setTitle('潮流商品搜索 | YOHO!有货');
  20 + $this->setKeywords('Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流');
  21 + $this->setDescription('潮流商品搜索,上衣,衬衫,TEE,卫衣,冲锋衣,风衣,羽绒服,裤子,休闲鞋,板鞋,配饰,复古眼镜');
19 $this->setWebNavHeader(); 22 $this->setWebNavHeader();
20 $this->_view->display('search', $data); 23 $this->_view->display('search', $data);
21 } 24 }