Showing
1 changed file
with
2 additions
and
2 deletions
@@ -98,8 +98,8 @@ class HomeModel | @@ -98,8 +98,8 @@ class HomeModel | ||
98 | 98 | ||
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'])) { | ||
102 | - $result = Helpers::getImageUrl($banner['data'][0]['data']['list'][0]['src'], 640, 800, 2); | 101 | + if (isset($banner['code']) && $banner['code'] == 200 && $banner['data']['total'] > 0) { |
102 | + $result = Helpers::getImageUrl($banner['data']['list'][0]['data']['list'][0]['src'], 640, 800, 2); | ||
103 | } | 103 | } |
104 | 104 | ||
105 | if (USE_CACHE) { | 105 | if (USE_CACHE) { |
-
Please register or login to post a comment