12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- /**
- * IndexController.php UTF-8
- * 首页控制器
- *
- * @date : 2018/1/19 11:36
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : linjiebin <ljb@huosdk.com>
- * @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');
- }
- }
|