Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/cart
Showing
1 changed file
with
5 additions
and
1 deletions
@@ -99,7 +99,11 @@ class HomeModel | @@ -99,7 +99,11 @@ class HomeModel | ||
99 | // 调用接口获取数据 | 99 | // 调用接口获取数据 |
100 | $banner = IndexData::getBannerStart(self::CODE_BG); | 100 | $banner = IndexData::getBannerStart(self::CODE_BG); |
101 | if (isset($banner['code']) && $banner['code'] == 200 && !empty($banner['data'])) { | 101 | if (isset($banner['code']) && $banner['code'] == 200 && !empty($banner['data'])) { |
102 | - $result = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 2); | 102 | + $imgArr = $banner['data'][0]['data']; |
103 | + if (isset($banner['data'][0]['data']['list'])) { | ||
104 | + $imgArr = $banner['data'][0]['data']['list']; | ||
105 | + } | ||
106 | + $result = Helpers::getImageUrl($imgArr[0]['src'], 640, 800, 2); | ||
103 | } | 107 | } |
104 | 108 | ||
105 | if (USE_CACHE) { | 109 | if (USE_CACHE) { |
-
Please register or login to post a comment