Browse Source

修复移动端首页异常

彭俊 6 years ago
parent
commit
b239ddaf9a
1 changed files with 7 additions and 2 deletions
  1. 7 2
      Application/Sports/Controller/MatchList.php

+ 7 - 2
Application/Sports/Controller/MatchList.php

@@ -264,7 +264,7 @@ class  MatchList extends Controller {
         //洲下所有联赛
         $select=['st_area_country.id as region_id','st_area_country.name as region',$st_league.'.id as lg_id',$st_league.'.country_id',$st_league.'.name_chinese as league',$st_competition.'.id as match_id'];
         $area = $this->getRegionInfo($where,$search,$select,'st_area_country','id','area_id',$gameType);
-        $data['info'] = array_merge($country=[],$area=[]);
+        $data['info'] = array_merge($country,$area);
         Render($data, '1', lang('Tips','Sports')->get('success'));
     }
     /**
@@ -505,10 +505,15 @@ class  MatchList extends Controller {
             $model_league = $models['model_league'];
             $model_result = $models['model_result'];
 
+            $where[] = ['status','=',0];
+            //如果是串场,则获取串场赔率
+            if($oddsType == 'StStringScene'){
+                $where[] = ['is_stringscene','=',1];
+            }
             $oddsData = lm($model_odds, 'Sports')
                 ->select('sort','p_code','id','odds_only','odds_code',$model_odds.'.status','odds','condition','sort','source','utime')
                 ->where([$model_odds.'.match_id'=>$matchID,$model_odds.'.type'=>0])
-                ->where(['status'=>0])
+                ->where($where)
                 ->orderBy('sort', 'desc')
                 ->orderBy('p_code','desc')
                 ->orderBy('odds_code','desc')