Authored by Rock Zhang

新品到着,折扣专区顶部banner兼容一张与多张图片;修复新品到着,折扣专区筛选数据选中数据不正确的bug

... ... @@ -59,12 +59,9 @@ class FloorProcess
{
$result = array();
foreach ($data as &$one) {
$one['url'] = Helpers::getFilterUrl($one['url']);
$one['img'] = Helpers::getImageUrl($one['src'], 640, 310);
unset($one['src']);
foreach ($data as $one) {
$result['bannerTop']['list'][] = Helpers::formatBanner($one, 640, 240);
}
$result['bannerTop']['list'] = $data;
return $result;
}
... ...
... ... @@ -197,6 +197,8 @@ class ListProcess
foreach ($result['subs'] as &$val) {
if ($val['dataId'] === $gender) {
$val['chosed'] = true;
$result['name'] = $val['name'];
}
}
... ...
... ... @@ -183,8 +183,14 @@ class NewsaleModel
$newsale = NewsaleData::getNewsaleFocus($codeKey);
// 调用接口获取数据并封装
if (isset($newsale['code']) && isset($newsale['data'][0]['data'][0])) {
$result = Helpers::formatBanner($newsale['data'][0]['data'][0], 640, 240);
if (isset($newsale['code']) && isset($newsale['data'][0]['data'])) {
if(count($newsale['data'][0]['data']) === 1) {
$result = Helpers::formatBanner($newsale['data'][0]['data'][0], 640, 240);
} else {
foreach ($newsale['data'][0]['data'] as $one) {
$result['list'][] = Helpers::formatBanner($one, 640, 240);
}
}
}
if (USE_CACHE) {
... ...