...
|
...
|
@@ -80,18 +80,23 @@ class ShopModel |
|
|
if (isset($sknProList['data']['product_list'])) {
|
|
|
$coverList = array();
|
|
|
|
|
|
foreach ($sknProList['data']['product_list'] as $prod) {
|
|
|
$coverList[$prod['product_skn']] = HelperSearch::getProductPic(array(0 => $prod));
|
|
|
$proList = HelperSearch::getProductList($sknProList['data']['product_list'], array(
|
|
|
'imgSize' => array(250, 250),
|
|
|
'defaultCover' => true
|
|
|
));
|
|
|
|
|
|
foreach ($proList as $prod) {
|
|
|
$coverList[$prod['skn']] = $prod['thumb'];
|
|
|
}
|
|
|
|
|
|
foreach ($data['newArrivel']['list'] as $k => $v) {
|
|
|
foreach ($data['newArrivel']['list'] as &$v) {
|
|
|
if (isset($coverList[$v['product_skn']])) {
|
|
|
$data['newArrivel']['list'][$k]['img'] = $coverList[$v['product_skn']][0]['coverImg'];
|
|
|
$v['img'] = $coverList[$v['product_skn']];
|
|
|
}
|
|
|
}
|
|
|
foreach ($data['hotSingle']['list'] as $k => $v) {
|
|
|
foreach ($data['hotSingle']['list'] as &$v) {
|
|
|
if (isset($coverList[$v['product_skn']])) {
|
|
|
$data['hotSingle']['list'][$k]['img'] = $coverList[$v['product_skn']][0]['coverImg'];
|
|
|
$v['img'] = $coverList[$v['product_skn']];
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -122,7 +127,11 @@ class ShopModel |
|
|
}
|
|
|
|
|
|
// 组织模板数据
|
|
|
$result = HelperSearch::getList($res, $searchCondition['options'], $searchCondition['userInput']);
|
|
|
$result = HelperSearch::getList($res, array_merge(
|
|
|
array('defaultCover' => true),
|
|
|
$searchCondition['options']
|
|
|
), $searchCondition['userInput']);
|
|
|
|
|
|
$data['pathNav'] = array_merge(
|
|
|
HelperSearch::$listNav,
|
|
|
array(
|
...
|
...
|
@@ -204,7 +213,10 @@ class ShopModel |
|
|
}
|
|
|
|
|
|
// 组织模板数据
|
|
|
$result = HelperSearch::getList($res, $searchCondition['options'], $searchCondition['userInput']);
|
|
|
$result = HelperSearch::getList($res, array_merge(
|
|
|
array('defaultCover' => true),
|
|
|
$searchCondition['options']
|
|
|
), $searchCondition['userInput']);
|
|
|
|
|
|
$data['goods'] = $result['goods'];
|
|
|
$data['opts'] = $result['opts'];
|
...
|
...
|
|