|
@@ -59,12 +59,13 @@ class IndexController extends webApp
|
|
|
public function data()
|
|
public function data()
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
|
|
|
+ $position = request()->post('position',1);
|
|
|
$data = [
|
|
$data = [
|
|
|
// 公告
|
|
// 公告
|
|
|
'notices' => NoticeService::make()->getRecommandList(),
|
|
'notices' => NoticeService::make()->getRecommandList(),
|
|
|
|
|
|
|
|
// 轮播
|
|
// 轮播
|
|
|
- 'banners' => AdService::make()->getListByPosition(1),
|
|
|
|
|
|
|
+ 'banners' => AdService::make()->getListByPosition($position),
|
|
|
];
|
|
];
|
|
|
return showJson(1010, true, $data);
|
|
return showJson(1010, true, $data);
|
|
|
} catch (\Exception $exception) {
|
|
} catch (\Exception $exception) {
|