Authored by yyq

img cover

... ... @@ -7,7 +7,7 @@
<div class="list-left pull-left">
<div class="shop-search">
<form action="//search.yohobuy.com" method="get" id="shop-search-form">
<form action="/shoplist" method="get" id="shop-search-form">
<span>
<input type="hidden" name="shopId" value="{{shopId}}">
<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
$sknProList = SearchData::searchAll(array('query' => join(',', array_unique($sknList))));
if (isset($sknProList['data']['product_list'])) {
if (isset($sknProList['data']['product_list']) && !empty($sknProList['data']['product_list'])) {
$coverList = array();
$proList = HelperSearch::getProductList($sknProList['data']['product_list'], array(
'imgSize' => array(250, 250),
'defaultCover' => true
));
'imgSize' => array(250, 250),
'defaultCover' => true
));
foreach ($proList as $prod) {
$coverList[$prod['skn']] = $prod['thumb'];
}
foreach ($data['newArrivel']['list'] as &$v) {
if (isset($coverList[$v['product_skn']])) {
$v['img'] = $coverList[$v['product_skn']];
if (isset($coverList[$v['productSkn']])) {
$v['img'] = $coverList[$v['productSkn']];
}
}
foreach ($data['hotSingle']['list'] as &$v) {
if (isset($coverList[$v['product_skn']])) {
$v['img'] = $coverList[$v['product_skn']];
if (isset($coverList[$v['productSkn']])) {
$v['img'] = $coverList[$v['productSkn']];
}
}
}
//店铺介绍
$data['brandIntro'] = self::getIntro($shopId, $parameters['uid']);
... ...