فهرست منبع

修复首页异常

彭俊 6 سال پیش
والد
کامیت
3a6c06499d
2فایلهای تغییر یافته به همراه10 افزوده شده و 5 حذف شده
  1. 8 5
      Application/Sports/Controller/MatchList.php
  2. 2 0
      Biz/Match/GetOddsData.php

+ 8 - 5
Application/Sports/Controller/MatchList.php

@@ -197,7 +197,7 @@ class  MatchList extends Controller {
                 $data  = $this->getMatchInfo($where,$Orwhere,$where_search,$game_code);
         break;
         }
-
+ 
         //根据赛事ID获取赔率数据
         $matchData = [];
         foreach($data as $k => $v){
@@ -205,18 +205,21 @@ class  MatchList extends Controller {
                 $matchData[] =$vv;
             }
         }
+
+        $oddsTypeWhere = [[$getModels['model_odds'].'.is_stringscene','=',0]];
         if($game_code == 'zq'){
-            $matchData = $this->getOddsData->getOddsZQ($matchData,$st_odds,$this->source);
+            $matchData = $this->getOddsData->getOddsZQ($matchData,$st_odds,$this->source,$oddsTypeWhere);
         }
         if($game_code == 'lq'){
-            $matchData = $this->getOddsData->getOddsLQ($matchData,$st_odds,$this->source);
+            $matchData = $this->getOddsData->getOddsLQ($matchData,$st_odds,$this->source,$oddsTypeWhere);
         }
         if($game_code == 'bq'){
-            $matchData = $this->getOddsData->getOddsBQ($matchData,$st_odds,$this->source);
+            $matchData = $this->getOddsData->getOddsBQ($matchData,$st_odds,$this->source,$oddsTypeWhere);
         }
         if($game_code == 'wq'){
-            $matchData = $this->getOddsData->getOddsWQ($matchData,$st_odds,$this->source);
+            $matchData = $this->getOddsData->getOddsWQ($matchData,$st_odds,$this->source,$oddsTypeWhere);
         }
+
         foreach($data as $k => $v){
             $v['match_info'] = [];
             foreach($matchData as $kk=>$vv){

+ 2 - 0
Biz/Match/GetOddsData.php

@@ -15,6 +15,7 @@ class GetOddsData {
      * 根据不同球类获取相关赔率数据
      */
     public function getOddsData($data,$whereDate,$source,$oddsTypeWhere=''){
+
         if($data['search']){
             $search = $data['search'];
         }
@@ -47,6 +48,7 @@ class GetOddsData {
                     });
             })
             ->get()->toArray();
+
         //===获取当前赛事是否有赔率,如果没有则去除===
         $matchData = $this->commonFunction->Handle_Odds_Null($matchData,$models);
         if(empty($matchData))  throw new \Exception(Render([], '10004', lang('Tips','Sports')->get('PARAM_ERROR')));