* @version : HUOSDK 8.0 */ namespace web\pc\controller\v8; use web\common\controller\WebBaseController; use web\pc\logic\GameLogic; use web\pc\logic\GiftLogic; use web\pc\logic\PostLogic; use web\pc\logic\SlideLogic; use web\pc\logic\LinksLogic; use web\pc\logic\GameserverLogic; class IndexController extends WebBaseController { public function __construct() { parent::__construct(); } /** * 首页 * * @return mixed */ public function index() { $_web_info = $this->web_info; $this->set_seo($_web_info['web_basic']['company_name']); $_game_class = new GameLogic(); $_gift_class = new GiftLogic(); $_posts_class = new PostLogic(); $_slide_class = new SlideLogic(); $_links_class = new LinksLogic(); $_server_class = new GameserverLogic(); $_fine_game = $_game_class->getList(['fine' => 1], '1,10', '-fine_order'); $_hot_game = $_game_class->getList(['hot' => 1], '1,4', '-hot_order'); $_gift_list = $_gift_class->getGifts(0); $_news_list['new'] = $_posts_class->getList(['catalog' => 1], '1,5','id desc'); $_news_list['activity'] = $_posts_class->getList(['catalog' => 2], '1,5'); $_news_list['strategy'] = $_posts_class->getList(['catalog' => 3], '1,5'); $_bg_thumb = $_slide_class->getList(['type' => 'web_index_middle']); $_text = $_slide_class->getList(['type' => 'web_index_text']); $_link = $_links_class->getList(); $_time1 = strtotime(date('Y-m-d')); $_time2 = strtotime(date('Y-m-d').' 23:59:59'); $_today_map = [ 'time' => ['BETWEEN', [$_time1, $_time2]] ]; $_server_list = $_server_class->getList($_today_map, '1,5'); $_rdata = [ 'fine_game' => $_fine_game, 'gift_list' => $_gift_list, 'news' => $_news_list, 'hot_game' => $_hot_game, 'bg_thumb' => $_bg_thumb, 'link' => $_link, 'server_list' => $_server_list, 'text' => $_text ]; $this->assign($_rdata); return $this->fetch('Index/index'); } }