|
@@ -187,6 +187,7 @@ class GetmatchData {
|
|
|
}
|
|
}
|
|
|
$c_s = array_slice($zu['concede_size'],0,4);//让球/大小 前四条 放入
|
|
$c_s = array_slice($zu['concede_size'],0,4);//让球/大小 前四条 放入
|
|
|
$capot = $zu['capot'];//独赢
|
|
$capot = $zu['capot'];//独赢
|
|
|
|
|
+ $capot = [$capot[0],$capot[2],$capot[1]];//排序
|
|
|
|
|
|
|
|
$data[$k]['matchData'][$kk]['oddsData'] = [$c_s,$capot];
|
|
$data[$k]['matchData'][$kk]['oddsData'] = [$c_s,$capot];
|
|
|
}
|
|
}
|
|
@@ -236,6 +237,7 @@ class GetmatchData {
|
|
|
->where($source)
|
|
->where($source)
|
|
|
->where($model_match.'.lg_id',$v['lg_id'])
|
|
->where($model_match.'.lg_id',$v['lg_id'])
|
|
|
->where($where)
|
|
->where($where)
|
|
|
|
|
+ ->orderBy('match_time','asc')
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|
|
|
}
|
|
}
|
|
@@ -829,7 +831,6 @@ class GetmatchData {
|
|
|
* 获取所有即将开赛 数据
|
|
* 获取所有即将开赛 数据
|
|
|
*/
|
|
*/
|
|
|
public function getAllSoon($source,$where){
|
|
public function getAllSoon($source,$where){
|
|
|
-
|
|
|
|
|
$game = lm('GameType', 'Sports')->select('id','game_name','game_code','game_ico_url')->where('status',1)->get()->toArray();
|
|
$game = lm('GameType', 'Sports')->select('id','game_name','game_code','game_ico_url')->where('status',1)->get()->toArray();
|
|
|
|
|
|
|
|
$data=[];
|
|
$data=[];
|
|
@@ -841,7 +842,9 @@ class GetmatchData {
|
|
|
->select('match_id','home_team','guest_team','match_time')
|
|
->select('match_id','home_team','guest_team','match_time')
|
|
|
->where($source)
|
|
->where($source)
|
|
|
->where($where)
|
|
->where($where)
|
|
|
-// ->limit(6)
|
|
|
|
|
|
|
+ ->orderBy('match_time','asc')
|
|
|
|
|
+
|
|
|
|
|
+ // ->limit(6)
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
$matchNum = count($matchData);
|
|
$matchNum = count($matchData);
|
|
|
|
|
|
|
@@ -853,6 +856,7 @@ class GetmatchData {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if($matchNum > 0){
|
|
if($matchNum > 0){
|
|
|
|
|
+// $matchData = array_multisort(array_column($matchData,'wait_time'),SOTR_ASC,$matchData);
|
|
|
$data[$item['game_code']]['matchData'] = $matchData;
|
|
$data[$item['game_code']]['matchData'] = $matchData;
|
|
|
$data[$item['game_code']]['matchNum'] = $matchNum;
|
|
$data[$item['game_code']]['matchNum'] = $matchNum;
|
|
|
$data[$item['game_code']]['gameName'] = $item['game_name'];
|
|
$data[$item['game_code']]['gameName'] = $item['game_name'];
|