123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace h5wap\wap\controller;
- use h5wap\common\controller\V2BaseController;
- use huo\controller\game\GameList;
- use huo\controller\slide\Slide;
- use huo\controller\wap\Option;
- use huolib\constant\GameConst;
- use huolib\constant\SlideConst;
- use huolib\status\AdsStatus;
- use huolib\status\GameStatus;
- use huo\controller\member\Member;
- class HomeController extends V2BaseController {
- public function _initialize() {
- parent::_initialize();
- }
- public function index() {
- $_mem_id = $this->mem_id;
- $_ads_class = new Slide();
- $_hometopper = $_ads_class->getList(SlideConst::SLIDE_H5WAP_TOPPER);
- if (empty($_hometopper) || AdsStatus::NO_ERROR != $_hometopper['code']) {
- $_rdata['hometopper'] = null;
- } else {
- $_rdata['hometopper'] = $_hometopper['data'];
- }
- $_game_class = new GameList();
- $_from = GameConst::GAME_H5;
- $_played_game = $_game_class->getPlayedList($_mem_id, $_from);
- if (empty($_played_game) || GameStatus::NO_ERROR != $_played_game['code']) {
- $_rdata['playedgame'] = null;
- } else {
- $_rdata['playedgame'] = $_played_game['data'];
- }
- $_hotgame = $_game_class->getHotList($_from);
- if (empty($_hotgame) || GameStatus::NO_ERROR != $_hotgame['code']) {
- $_rdata['hotgame'] = null;
- } else {
- $_rdata['hotgame'] = $_hotgame['data'];
- }
- if ($this->mem_id) {
- $_data = (new Member())->getMemInfo($this->mem_id);
- $_rdata['userinfo'] = $_data;
- } else {
- $_rdata['userinfo'] = null;
- }
- $this->assign('hometopper', $_rdata['hometopper']);
- $this->assign('playedgame', $_rdata['playedgame']);
- $this->assign('hotgame', $_rdata['hotgame']);
- $this->assign('userinfo', $_rdata['userinfo']);
-
- $_seo_data = Option::ins()->getSeoValue('h5_wap_index_seo');
- $this->assign('seo', $_seo_data);
- return $this->fetch('home/index');
- }
- }
|