|
@@ -184,12 +184,12 @@ class NewsaleModel |
|
@@ -184,12 +184,12 @@ class NewsaleModel |
184
|
$newsale = NewsaleData::getNewsaleFocus($codeKey);
|
184
|
$newsale = NewsaleData::getNewsaleFocus($codeKey);
|
185
|
|
185
|
|
186
|
// 调用接口获取数据并封装
|
186
|
// 调用接口获取数据并封装
|
187
|
- if (isset($newsale['code']) && isset($newsale['data'][0]['data'])) {
|
|
|
188
|
- if(count($newsale['data'][0]['data']) === 1) {
|
|
|
189
|
- $result = Helpers::formatBanner($newsale['data'][0]['data'][0], 640, 240);
|
187
|
+ if (isset($newsale['code']) && isset($newsale['data']['list'])) {
|
|
|
188
|
+ if(count($newsale['data']['list']) === 1) {
|
|
|
189
|
+ $result = Helpers::formatBanner($newsale['data']['list'][0]['data'][0], 640, 240);
|
190
|
} else {
|
190
|
} else {
|
191
|
- foreach ($newsale['data'][0]['data'] as $one) {
|
|
|
192
|
- $result['list'][] = Helpers::formatBanner($one, 640, 240);
|
191
|
+ foreach ($newsale['data']['list'] as $one) {
|
|
|
192
|
+ $result['list'][] = Helpers::formatBanner($one['data'], 640, 240);
|
193
|
}
|
193
|
}
|
194
|
}
|
194
|
}
|
195
|
}
|
195
|
}
|