...
|
...
|
@@ -311,56 +311,6 @@ class ShopProcess |
|
|
*/
|
|
|
private static function hotProducts_APP($data)
|
|
|
{
|
|
|
$condition['productSkn'] = '';
|
|
|
|
|
|
foreach ($data as $val) {
|
|
|
$condition['productSkn'] .= $val['productSkn'] . ',';
|
|
|
}
|
|
|
|
|
|
/* tar modified 160826 根据资源位接口返回的 skn 去查数据,查到后取商品数据,查不到取资源位接口数据 */
|
|
|
$hotProducts = SearchData::searchBySkn($condition);
|
|
|
|
|
|
if (isset($hotProducts['code']) && $hotProducts['code'] === 200 && isset($hotProducts['data']['product_list'])) {
|
|
|
foreach ($hotProducts['data']['product_list'] as $val) {
|
|
|
|
|
|
/* 取第一个设为默认商品 goods */
|
|
|
$defaultGoods = $val['goods_list'][0];
|
|
|
|
|
|
/* 判断是否设置了默认 goods,如果设置了就重新赋值 */
|
|
|
foreach ($val['goods_list'] as $key => $goods) {
|
|
|
if ($goods['is_default'] === 'Y') {
|
|
|
$defaultGoods = $goods;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$goodsCover = $val['goods_list'][0]['images_url'];
|
|
|
|
|
|
if (self::$channel == 1) {
|
|
|
$goodsCover = empty($defaultGoods['cover_1']) ? $defaultGoods['images_url'] : $defaultGoods['cover_1'];
|
|
|
}
|
|
|
|
|
|
if (self::$channel == 2) {
|
|
|
$goodsCover = empty($defaultGoods['cover_2']) ? $defaultGoods['images_url'] : $defaultGoods['cover_2'];
|
|
|
}
|
|
|
|
|
|
/* 如果还是没取到,取 product 默认图片 */
|
|
|
if (empty($goodsCover)) {
|
|
|
$goodsCover = $val['default_images'];
|
|
|
}
|
|
|
|
|
|
$goods = array(
|
|
|
'url' => Helpers::getUrlBySkc($val['product_id'], $val['goods_list'][0]['goods_id'], $val['cn_alphabet']),
|
|
|
'img' => Helpers::getImageUrl($goodsCover, 235, 314),
|
|
|
'productName' => $val['product_name'],
|
|
|
'salesPrice' => '¥' . $val['sales_price'],
|
|
|
'presentPrice' => '¥' . $val['sales_price']
|
|
|
);
|
|
|
if (!empty(self::$appVersion)) {
|
|
|
$goods['url'] .= '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":' . $val['product_skn'] . '}}';
|
|
|
}
|
|
|
self::$shopData['hotList'][] = $goods;
|
|
|
}
|
|
|
} else {
|
|
|
$productSkn = array();
|
|
|
foreach ($data as $val) {
|
|
|
$productSkn[] = $val['productSkn'];
|
...
|
...
|
@@ -379,7 +329,6 @@ class ShopProcess |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 店铺下面的所有分类
|
...
|
...
|
|