...
|
...
|
@@ -61,6 +61,41 @@ class ShopModel |
|
|
exit();
|
|
|
}
|
|
|
|
|
|
$sknList = array();
|
|
|
|
|
|
if (isset($data['newArrivel']['list'])) {
|
|
|
foreach ($data['newArrivel']['list'] as $prod) {
|
|
|
$sknList[] = $prod['productSkn'];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (isset($data['hotSingle']['list'])) {
|
|
|
foreach ($data['hotSingle']['list'] as $prod) {
|
|
|
$sknList[] = $prod['productSkn'];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$sknProList = SearchData::searchAll(array('query' => join(',', array_unique($sknList))));
|
|
|
|
|
|
if (isset($sknProList['data']['product_list'])) {
|
|
|
$coverList = array();
|
|
|
|
|
|
foreach ($sknProList['data']['product_list'] as $prod) {
|
|
|
$coverList[$prod['product_skn']] = HelperSearch::getProductPic(array(0 => $prod));
|
|
|
}
|
|
|
|
|
|
foreach ($data['newArrivel']['list'] as $k => $v) {
|
|
|
if (isset($coverList[$v['product_skn']])) {
|
|
|
$data['newArrivel']['list'][$k]['img'] = $coverList[$v['product_skn']][0]['coverImg'];
|
|
|
}
|
|
|
}
|
|
|
foreach ($data['hotSingle']['list'] as $k => $v) {
|
|
|
if (isset($coverList[$v['product_skn']])) {
|
|
|
$data['hotSingle']['list'][$k]['img'] = $coverList[$v['product_skn']][0]['coverImg'];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//店铺介绍
|
|
|
$data['brandIntro'] = self::getIntro($shopId, $parameters['uid']);
|
|
|
|
...
|
...
|
@@ -699,6 +734,7 @@ class ShopModel |
|
|
public static function getResourceData($data, $shopId)
|
|
|
{
|
|
|
$result = isset($data['resource_data']) ? json_decode($data['resource_data'], true) : array();
|
|
|
|
|
|
foreach ($result as $key => &$val) {
|
|
|
$val['url'] = self::modifyUrl($val, $shopId);
|
|
|
|
...
|
...
|
@@ -714,6 +750,7 @@ class ShopModel |
|
|
|
|
|
if (!isset($val['data']) && is_array($val)) {
|
|
|
foreach ($val as $k1 => &$v1) {
|
|
|
if (is_array($v1)) {
|
|
|
$url = self::modifyUrl($v1, $shopId);
|
|
|
if (!empty($url)) {
|
|
|
$v1['url'] = $url;
|
...
|
...
|
@@ -721,6 +758,7 @@ class ShopModel |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$data['resource_data'] = $result;
|
|
|
return $data;
|
...
|
...
|
|