12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- /**
- * HomeController.php UTF-8
- *
- *
- * @date : 2018/6/14 14:25
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : luowei <lw@huosdk.com>
- * @version : HUOSDK 8.0
- */
- namespace api\wapapp\controller\v8;
- use api\common\controller\V2ApiBaseController;
- use huo\controller\game\GameList;
- use huo\controller\slide\Slide;
- use huo\logic\slide\SlideLogic;
- use huolib\constant\GameConst;
- use huolib\constant\SlideConst;
- class HomeController extends V2ApiBaseController {
- public function _initialize() {
- parent::_initialize();
- }
- /**
- * 首页请求
- * http://doc.1tsdk.com/138?page_id=2838
- * 【域名】/v8/home/index
- */
- public function index() {
- //顶部轮播图
- $_app_index = (new SlideLogic())->getList(['type' => SlideConst::SLIDE_APP_INDEX]);
- //轮播文字
- $_app_index_text = (new SlideLogic())->getList(['type' => SlideConst::SLIDE_APP_INDEX_TEXT]);
- //新游推荐轮播图
- $_app_index_rmd = (new SlideLogic())->getList(['type' => SlideConst::SLIDE_APP_INDEX_RMD]);;
- //推荐游戏列表
- $_new_rmd = (new GameList())->getList(['remd' => GameConst::GAME_IS_NEW], '1,5');
- //猜你喜欢游戏列表
- $_like_game = (new GameList())->getList(['is_new' => GameConst::GAME_IS_NEW], '1,5');
- $_return_data = [
- 'hometopper' => $_app_index,
- 'texthome' => $_app_index_text,
- 'homenewrmd' => $_app_index_rmd,
- 'newrmd' => $_new_rmd['data'],
- 'likegame' => $_like_game['data'],
- ];
- $this->success(lang('SUCCESS'), $_return_data);
- }
- }
|