瀏覽代碼

按键程序

mzx16822 6 年之前
父節點
當前提交
8f266d0ad1
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      public/h5/datigame/js/common.js

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

@@ -79,7 +79,9 @@ common={
  		var type=e.type;
  		switch(type){
  			case 'init':
-
+ 			_this.bdSocket(function(res){
+ 				console.log(res.msg);
+ 			});
  			    break;
           case 'player_join':
           _this.player_join(e);
@@ -197,9 +199,7 @@ common={
  		}
  		this.getUserInfo(function(res){
  			_this.userInfo=res.info;
- 			_this.bdSocket(function(res){
- 				console.log(res.msg);
- 			});
+ 			_this.initSocket();
 
  		})