...
|
...
|
@@ -604,18 +604,14 @@ class Process |
|
|
// single_image & floor & single_image
|
|
|
$list = array_merge($data[$key + 1]['data'], array_slice($data[$key + 2]['data'], 0, 6), $data[$key + 3]['data']);
|
|
|
foreach ($list as $listKey => $val) {
|
|
|
$width = 185;
|
|
|
$height = 248;
|
|
|
$w = 377;
|
|
|
$h = 504;
|
|
|
if ($listKey == 0 || $listKey == 7) {
|
|
|
$val['src'] = Images::getImageUrl($val['src'], $w, $h, 1);
|
|
|
$val['src'] = Images::getImageUrl($val['src'], 377, 504, 1);
|
|
|
$result['newReport']['list'][] = array(
|
|
|
'href' => $val['url'],
|
|
|
'img' => $val['src']
|
|
|
);
|
|
|
} else {
|
|
|
$val['src'] = Images::getImageUrl($val['src'], $width, $height, 1);
|
|
|
$val['src'] = Images::getImageUrl($val['src'], 185, 248, 1);
|
|
|
$result['newReport']['list'][] = array(
|
|
|
'href' => $val['url'],
|
|
|
'img' => $val['src']
|
...
|
...
|
@@ -656,6 +652,8 @@ class Process |
|
|
$result['category']['navs'] = self::mergeNavProcess($data[$key + 1], $type);
|
|
|
}
|
|
|
// floor模版
|
|
|
$width = 0;
|
|
|
$height = 0;
|
|
|
foreach ($data[$key + 2]['data'] as $pos => $val) {
|
|
|
$width = 185; $height = 510;
|
|
|
if($pos == 1) {
|
...
|
...
|
@@ -761,8 +759,9 @@ class Process |
|
|
{
|
|
|
$result = array();
|
|
|
foreach ($data['data'] as $val) {
|
|
|
if (empty($val))
|
|
|
if (empty($val)) {
|
|
|
continue;
|
|
|
}
|
|
|
$result[] = array(
|
|
|
'href' => $val['url'],
|
|
|
'name' => $val['name']
|
...
|
...
|
@@ -790,8 +789,10 @@ class Process |
|
|
'client_type' => 'web'
|
|
|
);
|
|
|
$goodsList = SearchData::searchElasticByCondition($params, false);
|
|
|
$goodsList = $goodsList['data']['product_list'];
|
|
|
$goodsList = empty($goodsList) ? array() : $goodsList['data']['product_list'];
|
|
|
$pos = 0;
|
|
|
$url = '';
|
|
|
$oneGoods = array();
|
|
|
foreach ($goodsList as $goods)
|
|
|
{
|
|
|
$oneGoods = array();
|
...
|
...
|
@@ -802,10 +803,10 @@ class Process |
|
|
if (empty($goods)) {
|
|
|
continue;
|
|
|
}
|
|
|
$url = Helpers::getUrlBySkc($goods['product_id'], $goods['goods_list'][0]['goods_id'], $goods['cn_alphabet']);
|
|
|
$oneGoods['img'] = Images::getImageUrl($goods['goods_list'][0]['images_url'], 280, 373, 1);
|
|
|
$oneGoods['name'] = $goods['product_name'];
|
|
|
$oneGoods['price'] = $goods['sales_price'];
|
|
|
$url = Helpers::getUrlBySkc($goods['product_id'], $goods['goods_list'][0]['goods_id'], $goods['cn_alphabet']);
|
|
|
$oneGoods['href'] = Helpers::transUrl($url, $type);
|
|
|
$result[$goods['product_skn']] = $oneGoods;
|
|
|
}
|
...
|
...
|
@@ -838,7 +839,6 @@ class Process |
|
|
public static function mergeHotBrandsData($key,array &$data,$type)
|
|
|
{
|
|
|
$result = array();
|
|
|
$temp = array();
|
|
|
if ($data[$key]['template_name'] == 'custom_brands')
|
|
|
{
|
|
|
$result = array(
|
...
|
...
|
@@ -858,9 +858,7 @@ class Process |
|
|
$brands = $data[$key]['data']['list'];
|
|
|
foreach ($brands as $val)
|
|
|
{
|
|
|
$width = 185;
|
|
|
$height = 86;
|
|
|
$val['src'] = Images::getImageUrl($val['src'], $width, $height, 2);
|
|
|
$val['src'] = Images::getImageUrl($val['src'], 185, 86, 2);
|
|
|
$val['url'] = Helpers::transUrl($val['url'], $type);
|
|
|
$floor['logoBrand'][] = array(
|
|
|
'href' => $val['url'],
|
...
|
...
|
@@ -868,10 +866,10 @@ class Process |
|
|
);
|
|
|
}
|
|
|
$floor['moreBrand'] = Helpers::url('/brands');
|
|
|
$type_key = sprintf("%s_%s", $type, $key);
|
|
|
$cacheKey = sprintf("%s_%s", WebCacheConfig::KEY_WEB_INDEX_BRANDS_LIST_DATA, $type_key);
|
|
|
$typeKey = sprintf("%s_%s", $type, $key);
|
|
|
$cacheKey = sprintf("%s_%s", WebCacheConfig::KEY_WEB_INDEX_BRANDS_LIST_DATA, $typeKey);
|
|
|
Cache::set($cacheKey, $floor, 86400);
|
|
|
$result['hotBrands']['brandUrl'] = '/common/getIndexResourceBrand?type=' . $type_key;
|
|
|
$result['hotBrands']['brandUrl'] = Helpers::url('/common/getIndexResourceBrand', array('type' => $typeKey));
|
|
|
}
|
|
|
return $result;
|
|
|
}
|
...
|
...
|
|