Browse Source

修改首页按钮隐藏

smallqiang 5 years ago
parent
commit
20492c58a6

+ 15 - 15
assets/scene/game.fire

@@ -41,8 +41,8 @@
     },
     "_scale": {
       "__type__": "cc.Vec3",
-      "x": 0.36845249250374806,
-      "y": 0.36845249250374806,
+      "x": 0.3688038793103448,
+      "y": 0.3688038793103448,
       "z": 1
     },
     "_quat": {
@@ -346,12 +346,6 @@
     "homeGuide": {
       "__id__": 159
     },
-    "storeNode": {
-      "__id__": 100
-    },
-    "drawNode": {
-      "__id__": 106
-    },
     "inviteNode": {
       "__id__": 79
     },
@@ -739,7 +733,7 @@
     "_skewY": 0,
     "_zIndex": 0,
     "groupIndex": 0,
-    "_id": "e6VzB7/4pBULD6qlGQy7mY"
+    "_id": "31gzTzJlFPH6GcEy+MH0m/"
   },
   {
     "__type__": "cc.Label",
@@ -764,7 +758,7 @@
     "_N$verticalAlign": 1,
     "_N$fontFamily": "Arial",
     "_N$overflow": 0,
-    "_id": "5f72Qk7uFB25ac5rSn/yh5"
+    "_id": "e6tcnEgXlKkqtwFh1gUGLN"
   },
   {
     "__type__": "cc.LabelOutline",
@@ -782,7 +776,7 @@
       "a": 255
     },
     "_width": 3,
-    "_id": "9dfJPLd2ZJ2aEpkZoExIGL"
+    "_id": "cd1VVpZVtA86gAbaMReIpZ"
   },
   {
     "__type__": "cc.RichText",
@@ -1837,7 +1831,7 @@
     "_skewY": 0,
     "_zIndex": 0,
     "groupIndex": 0,
-    "_id": "56FgJMY3NCoJryERUvO/pe"
+    "_id": "950QbZU+xDEJxj6Mox/IOj"
   },
   {
     "__type__": "cc.Label",
@@ -1862,7 +1856,7 @@
     "_N$verticalAlign": 1,
     "_N$fontFamily": "Arial",
     "_N$overflow": 0,
-    "_id": "47As80lFVEkJpeiIZIzAWK"
+    "_id": "72mk11tjZFT4pB0U2idc+T"
   },
   {
     "__type__": "cc.RichText",
@@ -2282,7 +2276,7 @@
     "_skewY": 0,
     "_zIndex": 0,
     "groupIndex": 0,
-    "_id": "b4DXY6I1VD5KxZigfpnpzJ"
+    "_id": "8f6IXi6NdLTpI3d/WUrgNo"
   },
   {
     "__type__": "cc.Label",
@@ -2307,7 +2301,7 @@
     "_N$verticalAlign": 1,
     "_N$fontFamily": "Arial",
     "_N$overflow": 0,
-    "_id": "06yaWdYC5LD4i4dr+a6PBA"
+    "_id": "82Bqeg/LpG57BWsON2oEuO"
   },
   {
     "__type__": "cc.RichText",
@@ -2683,6 +2677,12 @@
     "drawNode": {
       "__id__": 106
     },
+    "friendRewardNode": {
+      "__id__": 112
+    },
+    "inviteNode": {
+      "__id__": 79
+    },
     "_id": "d6AgrqucZEX7D85OwYPB/T"
   },
   {

+ 15 - 1
assets/scripts/game/HomeSideCtrl.js

@@ -32,9 +32,15 @@ cc.Class({
         //7天登录按钮节点
         loginRewardNode: cc.Node,
 
+        //对应按钮
+        //商城
         storeNode: cc.Node,
-
+        //抽奖
         drawNode: cc.Node,
+        //自动点击
+        friendRewardNode: cc.Node,
+        //邀请
+        inviteNode: cc.Node
     },
 
     // LIFE-CYCLE CALLBACKS:
@@ -54,14 +60,22 @@ cc.Class({
         /// 如果是头条那么隐藏商城
         if (window.tt != undefined) {
             this.storeNode.active = false;
+            this.friendRewardNode.active = false;
+            this.inviteNode.active = false;
         }
 
         //判断正在审核中的版本隐藏7天登录按钮或已完成7天登录任务
         if (GameGlobal.isCheck || (GameGlobal.userLoginReward.isLoginReward && GameGlobal.userLoginReward.rewardCount == 7)) {
             this.loginRewardNode.active = false;
             this.moreContentWidth = 225;
+            if (window.tt != undefined) {
+                this.moreContentWidth = 104;
+            }
         } else {
             this.moreContentWidth = 346;
+            if (window.tt != undefined) {
+                this.moreContentWidth = 225;
+            }
         }
 
         /// 加载商城打折图片

+ 1 - 1
assets/scripts/levelHome/LevelHomeItem.js

@@ -198,7 +198,7 @@ cc.Class({
     },
 
     initRoomAd() {
-        if (!CC_WECHATGAME) {
+        if (!CC_WECHATGAME || window.tt == undefined) {
             return;
         }
 

+ 7 - 1
assets/scripts/utils/AlertManager.js

@@ -263,7 +263,13 @@ class AlertManager {
 
     // 显示错误消息提示
     static showCommonErrorAlert(message) {
-        if (CC_WECHATGAME) {
+        if (window.tt != undefined) {
+            //今日头条
+            tt.showToast({
+                title: message,
+                icon: 'none'
+            });
+        } else if (CC_WECHATGAME) {
             wx.showToast({
                 title: message,
                 icon: 'none'