Authored by Rock Zhang

修改频道选择也背景图片处理方式,修复newsale商品列表数据报错

@@ -99,7 +99,7 @@ class HomeModel @@ -99,7 +99,7 @@ class HomeModel
99 // 调用接口获取数据 99 // 调用接口获取数据
100 $banner = IndexData::getBannerStart(self::CODE_BG); 100 $banner = IndexData::getBannerStart(self::CODE_BG);
101 if (isset($banner['data'][0]['data']['list'][0]['src'])) { 101 if (isset($banner['data'][0]['data']['list'][0]['src'])) {
102 - $result = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 1); 102 + $result = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 2);
103 } 103 }
104 104
105 if (USE_CACHE) { 105 if (USE_CACHE) {
@@ -217,7 +217,7 @@ class NewsaleModel @@ -217,7 +217,7 @@ class NewsaleModel
217 { 217 {
218 $result = array(); 218 $result = array();
219 219
220 - if (isset($data['code']) && $data['code'] === 200) { 220 + if (isset($data['code']) && $data['code'] === 200 && isset($data['data']['product_list'])) {
221 foreach ($data['data']['product_list'] as $val) { 221 foreach ($data['data']['product_list'] as $val) {
222 $result['goods'][] = Helpers::formatProduct($val, true, false, false, 299,388); 222 $result['goods'][] = Helpers::formatProduct($val, true, false, false, 299,388);
223 } 223 }