Browse Source

Merge branch 'dev' of http://svn.ouj.com:3000/DWG/taptapstar into dev

smallqiang 5 years ago
parent
commit
c87537f344
3 changed files with 5 additions and 3 deletions
  1. 3 1
      assets/scripts/net/Ws.js
  2. 1 1
      assets/scripts/utils/Global.js
  3. 1 1
      tsconfig.json

+ 3 - 1
assets/scripts/net/Ws.js

@@ -445,7 +445,7 @@ WsManager.prototype.openTTConnect = function() {
         let data = message.data;
         if(data != 1) {
             if (Object.prototype.toString.call(data) === '[object ArrayBuffer]') {
-                data = Codec.read(data);
+                // data = Codec.read(data);
             }
             this.emit('message', data)
         }
@@ -476,6 +476,7 @@ WsManager.prototype.openH5Connect = function() {
         let code = event.code
         let reason = event.reason
         let wasClean = event.wasClean
+        clearInterval(this.keepAliveTimeout);
 
         //只要关闭就重连(暂时性处理)
         if(this._reconnection) {
@@ -495,6 +496,7 @@ WsManager.prototype.openH5Connect = function() {
     }
 
     _socket.onerror = (event) => {
+        clearInterval(this.keepAliveTimeout);
         if(this._reconnection) {
             this.reconnect()
         } else {

+ 1 - 1
assets/scripts/utils/Global.js

@@ -9,7 +9,7 @@ window.GameGlobal = {
     // 建筑管理
     BuildingManager: BuildingManager.instance,
 
-    debug: false,
+    debug: true,
 
     ver: 100, //游戏版本号发版时需要核对
     

+ 1 - 1
tsconfig.json

@@ -1,7 +1,7 @@
 {
   "compilerOptions": {
     "module": "commonjs",
-    "lib": [ "dom", "es5", "es2015.promise" ],
+    "lib": [ "dom", "es5", "es2015.promise", "es2015" ],
     "target": "es5",
     "experimentalDecorators": true,
     "skipLibCheck": true