field('server_name,start_time')->order("start_time desc")->where($map)->select(); return $data; } /** * 获取区服表 * @param $map * @param int $p * @return mixed * author: xmy 280564871@qq.com */ public function getServerLists($map,$p=1,$order="start_time"){ $page = intval($p); $page = $page ? $page : 1; //默认显示第一页数据 $row = 10; $map['show_status'] = 1; $map['g.display_site'] = ['like','%'.DISPLAY_SITE.'%']; $data = $this->table("tab_server as ser") ->field('server_name,start_time,ser.game_name,sor.pack_name,ser.game_id,g.ratio,g.icon,g.marking,g.features,g.dow_num,game_score') ->join("left join tab_game_source as sor on sor.game_id = ser.game_id") ->join("left join tab_game as g on g.id = ser.game_id") ->where($map) ->order($order) ->page($page,$row) ->select(); foreach ($data as $key => $val){ $data[$key]['down_url'] = GameModel::generateDownUrl($val['game_id']); $data[$key]['xia_status']=check_game_sorue($val['game_id']); $data[$key]['icon'] = get_img_url($val['icon']); } return $data; } }