mzx16822 %!s(int64=6) %!d(string=hai) anos
pai
achega
9d1b2e8be5
Modificáronse 1 ficheiros con 6 adicións e 9 borrados
  1. 6 9
      resources/views/home/user.blade.php

+ 6 - 9
resources/views/home/user.blade.php

@@ -134,16 +134,13 @@ layui.use(['form','jquery'], function(){
                 $("#py2_username").html(data.info.players[1]['username']);
                 $("#duishou").val(data.info.players[1]['uid']);
               }else{
-                $("#py1_avatar").html('<img src="' + data.info.players[1]['avatar'] + '" class="layui-circle">');
-                $("#py1_username").html(data.info.players[1]['username']+'(我)');
-                $("#py2_avatar").html('<img src="' + data.info.players[0]['avatar'] + '" class="layui-circle">');
-                $("#py2_username").html(data.info.players[0]['username']);
-                $("#duishou").val(data.info.players[0]['uid']);
+                $("#py1_avatar").html('<img src="' + data.info.players[0]['avatar'] + '" class="layui-circle">');
+                $("#py1_username").html(data.info.players[0]['username']+'(我)');
+                $("#py2_avatar").html('<img src="' + data.info.players[1]['avatar'] + '" class="layui-circle">');
+                $("#py2_username").html(data.info.players[1]['username']);
+                $("#duishou").val(data.info.players[1]['uid']);
               }
-              $("#userinfo").hide();
-              $("#start_game").show();
-              $("#out_game").hide();
-              $("#game").show();
+            
               if(data.info.room_id){
                 room_id = data.info.room_id;
                 getQuestion(data.info.room_id, cur_question);