彭俊 пре 6 година
родитељ
комит
65a595f548

+ 1 - 0
app/Http/Controllers/Admin/WqChampionsLeagueController.php

@@ -144,6 +144,7 @@ class WqChampionsLeagueController extends Controller
                     'result' => $isteam,
                     'ctime' => date('Y-m-d H:i:s',time()),
                     'status' => 0,
+                    'updated_at' => date('Y-m-d H:i:s',time()),
                 ];
 
                 if(empty($res)){

+ 13 - 3
app/Http/Model/StWqResult.php

@@ -141,6 +141,7 @@ class StWqResult extends Model
 
         //拼装赛事结果数据 
         $set_match_r = [];
+        $ss = [];
 
         if(!empty($match_result)){
             foreach($matchData as $k =>$v ){
@@ -151,12 +152,18 @@ class StWqResult extends Model
                 //获取赛事每节的赛果
                 $resultData = commonFunction::filter_by_value($match_result,'match_id',$v['id']);
             
-                if(!empty($resultData)){
+                //如果有获取到结果,并且进程不为空,则写入赛事结果数据
+                if(!empty($resultData) and $resultData['match_process'] != ''){
                     //获取赛果json
                     $result_mark = json_decode($resultData['result_mark'],true);
 
+                    $sss[] = $result_mark;
+
                     //获取进程
-                    $match_process = $result_mark['schedule'];
+                    $match_process = '';
+                    if($result_mark['schedule']){
+                        $match_process = $result_mark['schedule'];
+                    }
 
                     //获胜球员
                     $match_winer = '';
@@ -223,11 +230,13 @@ class StWqResult extends Model
                         "match_winer_player"=>  $match_winer?:'',//获胜队员
                         "match_process"=> $match_process?:'',//比赛进程
                         "inning"=> json_encode($inning)?:'',//每局输赢结果
-                    ];    
+                    ]; 
+
                 }
             }
         }
 
+
         //写入赛果
         if(!empty($set_match_r)){
             $ret = $model['model_result']::insert($set_match_r);
@@ -235,6 +244,7 @@ class StWqResult extends Model
         }
 
         return 1;
+
     }
 
     //计算滚球 赛事进行时间

+ 1 - 1
resources/views/admin/sportsfoot/outcome.blade.php

@@ -73,7 +73,7 @@
             <input type="text" style="width:30px;heigth:20px" id="u_guest_score@{{d.match_id}}" name="u_guest_score" value="@{{d.u_guest_score}}"> / 
             <input type="text" style="width:30px;heigth:20px" id="home_score@{{d.match_id}}" name="home_score" value="@{{d.home_score}}">
             <input type="text" style="width:30px;heigth:20px" id="guest_score@{{d.match_id}}" name="guest_score" value="@{{d.guest_score}}">
-            <button class="layui-btn layui-btn-sm lay-btn-diy" onclick="inputscore(@{{d.match_id}})"><h6>提交</h6></button>
+            <button class="layui-icon" onclick="inputscore(@{{d.match_id}})"><h6>提交</h6></button>
     </script>