You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB
PHTML

5 years ago
<?php
namespace Site\Controller;
use Think\Controller;
/**
* 开服 控制器
* lwx
*/
class OpenController extends BaseController {
const model_name = 'SiteServer';
public function index($p=1){
if (is_mobile_request()) {
empty($_GET['st']) && $_GET['st'] = -1;
$lists = D(self::model_name)->lists(1,'tab_site_server.game_id as id,tab_site_server.server_name,tab_site_game.game_id,tab_site_server.start_time,tab_site_server.server_version,tab_site_server.promote_id,tab_site_game.game_dow_url');
$this->assign('lists',$lists['data']);
$this->assign('total',$lists['total']);
} else {
parent::page(D(self::model_name)->lists($p,'tab_site_server.id,tab_site_server.server_name,tab_site_server.game_id,tab_site_server.start_time,tab_site_server.server_version,tab_site_server.promote_id',8));
}
$this->display();
}
public function more($p=2) {
$lists = D(self::model_name)->lists($p,'tab_site_server.id,tab_site_server.server_name,tab_site_server.game_id,tab_site_server.start_time,tab_site_server.server_version');
if ($lists['data']) {
echo json_encode(array('status'=>1,'info'=>'','list'=>$lists['data']));
} else {
echo json_encode(array('status'=>0,'info'=>''));
}
}
}