| 12345678910111213141516171819202122232425262728 |
- <?php
- namespace App\Http\Controllers\Api\v1;
- use App\Http\Controllers\Api\webApp;
- use App\Services\Common\AdService;
- use App\Services\Common\NoticeService;
- /**
- * 测试
- * Class TestController
- * @package App\Http\Controllers\Api
- */
- class IndexController extends webApp
- {
- public function data()
- {
- $ads = AdService::make()->getListByPosition(3,1);
- $data = [
- 'banners'=> AdService::make()->getListByPosition(1),
- 'menus'=> AdService::make()->getListByPosition(2,2),
- 'notices'=> NoticeService::make()->getDataList([], 6),
- 'ad'=> isset($ads[0])? $ads[0] : [],
- ];
- return message(1010, true, $data);
- }
- }
|