Browse Source

Merge branch 'dev' into dev2

# Conflicts:
#	assets/scene/game.fire
#	settings/builder.json
smallqiang 5 năm trước cách đây
mục cha
commit
62c625b7f7

+ 15 - 12
assets/scene/game.fire

@@ -41,8 +41,8 @@
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.367341650000464,
-      "y": 0.367341650000464,
+      "x": 0.35384621353193324,
+      "y": 0.35384621353193324,
       "z": 1
     },
     "_quat": {
@@ -328,6 +328,9 @@
     "myInfoTop": {
       "__id__": 7
     },
+    "grossNode": {
+      "__id__": 8
+    },
     "sidebar": {
       "__id__": 56
     },
@@ -733,7 +736,7 @@
     "_skewY": 0,
     "_zIndex": 0,
     "groupIndex": 0,
-    "_id": "3evfkmjwZNMpmzN6IzDKPT"
+    "_id": "6d89an32tBibBu9wIXub9d"
   },
   {
     "__type__": "cc.Label",
@@ -758,7 +761,7 @@
     "_N$verticalAlign": 1,
     "_N$fontFamily": "Arial",
     "_N$overflow": 0,
-    "_id": "d1DUuObOdOS6ojBkS19YhU"
+    "_id": "a0WYnxP5NLfJgg1mDyYc+7"
   },
   {
     "__type__": "cc.LabelOutline",
@@ -776,7 +779,7 @@
       "a": 255
     },
     "_width": 3,
-    "_id": "87w/3/oRBAYKeSHt/uPYN8"
+    "_id": "b2GEVwf0ZExb9yW2v7UntI"
   },
   {
     "__type__": "cc.RichText",
@@ -836,12 +839,12 @@
       "__id__": 8
     },
     "_enabled": true,
-    "alignMode": 1,
+    "alignMode": 2,
     "_target": null,
-    "_alignFlags": 18,
+    "_alignFlags": 17,
     "_left": 0,
     "_right": 0,
-    "_top": 0,
+    "_top": 40,
     "_bottom": 0,
     "_verticalCenter": 0,
     "_horizontalCenter": 0,
@@ -1831,7 +1834,7 @@
     "_skewY": 0,
     "_zIndex": 0,
     "groupIndex": 0,
-    "_id": "c4vBQLr51J4LiSt4sI8Czc"
+    "_id": "71BFS0vUVIHZoVDhfz837Z"
   },
   {
     "__type__": "cc.Label",
@@ -1856,7 +1859,7 @@
     "_N$verticalAlign": 1,
     "_N$fontFamily": "Arial",
     "_N$overflow": 0,
-    "_id": "93mHvdJMpGLZII8EpQGH2N"
+    "_id": "6eNxdObiFNKYmNZPXzDVa0"
   },
   {
     "__type__": "cc.RichText",
@@ -2276,7 +2279,7 @@
     "_skewY": 0,
     "_zIndex": 0,
     "groupIndex": 0,
-    "_id": "19uyMzv4FNDI3u4nWR10JF"
+    "_id": "4anisLTupA0p/Ct+qOBs4E"
   },
   {
     "__type__": "cc.Label",
@@ -2301,7 +2304,7 @@
     "_N$verticalAlign": 1,
     "_N$fontFamily": "Arial",
     "_N$overflow": 0,
-    "_id": "9d1Ddj5YJA/I85SZBWb/Ia"
+    "_id": "98dFFVf8xBh7XopClEZoNZ"
   },
   {
     "__type__": "cc.RichText",

+ 2 - 1
assets/scripts/common/Platform.js

@@ -386,7 +386,7 @@ class Platform {
             /// 发通知更新跟定时器相关的数据
             GameEvent.fire(GameNotificationKey.GameShowNotificationKey);
 
-            console.log('plat onshow ======= ' + GameGlobal.clickShare);
+            console.log('游戏 onshow ========= ' + GameGlobal.clickShare);
             if (GameGlobal.clickShare) {
                 let onHideTime = cc.sys.localStorage.getItem('onHideTimestamp');
 
@@ -436,6 +436,7 @@ class Platform {
     }
 
     static handelOnHide() {
+        console.log('游戏 onhide =========== ');
         GameGlobal.isOnHide = true;
         if (GameModule.userInfo) {
             GameModule.userInfo.doReport();

+ 5 - 0
assets/scripts/game/Game.js

@@ -22,6 +22,7 @@ cc.Class({
         levelHomePrefab: cc.Prefab,
 
         myInfoTop: cc.Node,
+        grossNode: cc.Node,
 
         sidebar: cc.Node,
 
@@ -112,6 +113,10 @@ cc.Class({
             this.myInfoTop.height = 200;
             this.sidebar.getComponent(cc.Widget).top = 180;
             this.messageListNode.getComponent(cc.Widget).top = 250 + 30;
+
+            if (window.tt != undefined) {
+                this.grossNode.getComponent(cc.Widget).top = 60;
+            }
         }
 
         this.additionTipsNode = this.additionTipsNode.getComponent('AdditionTips');

+ 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
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