var jsMatchvs = JCMatchVS var jcmsghandler = JCMsgHandler nwm = function(){ this.response = null; this.online = false; this.engine = null; this.roomUserInfoList = []; this.frames=[]; this.inRoom = false; this.cleanCb = function(){ this.cbOnLogin = null; this.cbOnCreateRoom =null; this.cbOnJoinRoom = null; this.cbjoinRoomNotify = null; this.cbleaveRoomNotify = null; this.cbRoomMerge = null; }; this.clean = function(){ this.online = false; this.frameIndex = 0; this.cleanCb(); this.roomUserInfoList = []; if(this.engine){ this.engine.loginOut(); this.engine.reconnectcount = 999; this.engine.disconnect(); this.engine = null; } } this.init = function(){ var response = new jcmsghandler(); NetWorkHandle.NetWorkManage = this; var self = this; response.initResponse = function(res){ if(res.status==0){ self.engine.login(); } } response.netResponse = function(res){ if(res.status==0){ console.log('net 成功'); } } response.joinRoomResponse= function(res){ // console.log(res); // if(res.status==0||res.status==-3){ // for(var i=0;i