mzx16822 6 years ago
parent
commit
533e4afdb1
1 changed files with 4 additions and 4 deletions
  1. 4 4
      public/h5/datigame/js/common.js

+ 4 - 4
public/h5/datigame/js/common.js

@@ -74,9 +74,9 @@ common={
         }
  		 
  	},onSocket:function(e){
- 		e=JSON.stringify(e);
+ 		var data=JSON.stringify(e.data);
  			var _this=this;
- 		var type=e.type;
+ 		var type=data.type;
  		switch(type){
  			case 'init':
  			_this.bdSocket(function(res){
@@ -84,10 +84,10 @@ common={
  			});
  			    break;
           case 'player_join':
-          _this.player_join(e);
+          _this.player_join(data);
           break;
           case 'question':
-          _this.loadQuestion(e);
+          _this.loadQuestion(data);
           break;
           case 'round_end':