|
@@ -88,6 +88,9 @@ cc.Class({
|
|
|
|
|
|
init(index = 0) {
|
|
|
this.tabIndex = index;
|
|
|
+ if (window.tt != undefined) {
|
|
|
+ this.tabIndex = 1;
|
|
|
+ }
|
|
|
this._initTab();
|
|
|
},
|
|
|
|
|
@@ -96,7 +99,7 @@ cc.Class({
|
|
|
},
|
|
|
|
|
|
onDestroy() {
|
|
|
- if (window.wx != undefined) {
|
|
|
+ if (CC_WECHATGAME && window.tt == undefined) {
|
|
|
window.wx.postMessage({
|
|
|
messageType: 4
|
|
|
});
|
|
@@ -116,6 +119,11 @@ cc.Class({
|
|
|
for(let i = 0; i < this.rankTab.length; i++) {
|
|
|
this.rankTab[i] = this.rankTab[i].getComponent('GameTab');
|
|
|
this.rankTab[i].init();
|
|
|
+ if (window.tt != undefined) {
|
|
|
+ if (i == 0 || i == 2) {
|
|
|
+ this.rankTab[i].node.active = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
this.handleTab(null, this.tabIndex);
|
|
|
},
|