mzx16822 6 anni fa
parent
commit
760f607f07
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      resources/views/home/user.blade.php

+ 3 - 3
resources/views/home/user.blade.php

@@ -163,12 +163,12 @@ layui.use(['form','jquery'], function(){
                   $("#py2_score").html(score+1);
                 }
               }
-              
+              var py1_score = parseInt($("#py1_score").html());
+              var py2_score = parseInt($("#py2_score").html());
                 if(data.is_end == 1){
                   //结算
                    $(".g-doc .g-inner").addClass("end");
-                  var py1_score = parseInt($("#py1_score").html());
-                  var py2_score = parseInt($("#py2_score").html());
+                  
                   var url = 'Quit';
                   if(py1_score > py2_score){
                     layer.msg('恭喜你获得胜利', {icon: 1, time: 2000}, function(){