Authored by yyq

img cover

@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 7
8 <div class="list-left pull-left"> 8 <div class="list-left pull-left">
9 <div class="shop-search"> 9 <div class="shop-search">
10 - <form action="//search.yohobuy.com" method="get" id="shop-search-form"> 10 + <form action="/shoplist" method="get" id="shop-search-form">
11 <span> 11 <span>
12 <input type="hidden" name="shopId" value="{{shopId}}"> 12 <input type="hidden" name="shopId" value="{{shopId}}">
13 <input id="shop-query-key" type="text" name="query" class="shop-query-key" autocomplete="off" x-webkit-speech="" lang="zh-CN" placeholder="关键词搜索"> 13 <input id="shop-query-key" type="text" name="query" class="shop-query-key" autocomplete="off" x-webkit-speech="" lang="zh-CN" placeholder="关键词搜索">
@@ -77,30 +77,30 @@ class ShopModel @@ -77,30 +77,30 @@ class ShopModel
77 77
78 $sknProList = SearchData::searchAll(array('query' => join(',', array_unique($sknList)))); 78 $sknProList = SearchData::searchAll(array('query' => join(',', array_unique($sknList))));
79 79
80 - if (isset($sknProList['data']['product_list'])) { 80 + if (isset($sknProList['data']['product_list']) && !empty($sknProList['data']['product_list'])) {
81 $coverList = array(); 81 $coverList = array();
82 82
83 $proList = HelperSearch::getProductList($sknProList['data']['product_list'], array( 83 $proList = HelperSearch::getProductList($sknProList['data']['product_list'], array(
84 - 'imgSize' => array(250, 250),  
85 - 'defaultCover' => true  
86 - )); 84 + 'imgSize' => array(250, 250),
  85 + 'defaultCover' => true
  86 + ));
87 87
88 foreach ($proList as $prod) { 88 foreach ($proList as $prod) {
89 $coverList[$prod['skn']] = $prod['thumb']; 89 $coverList[$prod['skn']] = $prod['thumb'];
90 } 90 }
91 -  
92 foreach ($data['newArrivel']['list'] as &$v) { 91 foreach ($data['newArrivel']['list'] as &$v) {
93 - if (isset($coverList[$v['product_skn']])) {  
94 - $v['img'] = $coverList[$v['product_skn']]; 92 + if (isset($coverList[$v['productSkn']])) {
  93 + $v['img'] = $coverList[$v['productSkn']];
95 } 94 }
96 } 95 }
97 foreach ($data['hotSingle']['list'] as &$v) { 96 foreach ($data['hotSingle']['list'] as &$v) {
98 - if (isset($coverList[$v['product_skn']])) {  
99 - $v['img'] = $coverList[$v['product_skn']]; 97 + if (isset($coverList[$v['productSkn']])) {
  98 + $v['img'] = $coverList[$v['productSkn']];
100 } 99 }
101 } 100 }
102 } 101 }
103 102
  103 +
104 //店铺介绍 104 //店铺介绍
105 $data['brandIntro'] = self::getIntro($shopId, $parameters['uid']); 105 $data['brandIntro'] = self::getIntro($shopId, $parameters['uid']);
106 106