|
|
@@ -8883,7 +8883,7 @@ e.prototype.initProgress = function() {
|
|
|
var t = this.curProgressScore / this.targetScore;
|
|
|
t = t > 1 ? 1 : t;
|
|
|
this.spr_progress.fillRange = t;
|
|
|
-if (t >= 1 && !this.ifOpenLevelRedBag) {
|
|
|
+if (t >= 1 && (gData.gameData.getProp(f.GameProp.levelNum) <= 0 || !this.ifOpenLevelRedBag)) {
|
|
|
gData.reward.subType = 2;
|
|
|
mk.ad.videoAdType = f.VideoAdType.LevelScoreRedBag;
|
|
|
mk.ui.getCurOnPanel("rewardLuck") || "1" != gData.gameData.funOpenData[6] || mk.ui.openPanel("module/reward/rewardLuck");
|
|
|
@@ -14311,11 +14311,16 @@ return [ 2 ];
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
-e.prototype.createNewTask = function(t) {
|
|
|
-var n = this, o = t.nebulaAppId, a = t.downloadUrl, i = t.packageName;
|
|
|
-if ("" != i && s.default.ifCanStartGame(i, !0)) return null;
|
|
|
-if (s.default.isFileExist(o)) {
|
|
|
-s.default.installApk(o);
|
|
|
+e.prototype.createNewTask = function(t, n) {
|
|
|
+var o = this;
|
|
|
+void 0 === n && (n = 0);
|
|
|
+var a = t.nebulaAppId, i = t.downloadUrl, r = t.packageName;
|
|
|
+if ("" != r && s.default.ifCanStartGame(r, !0)) {
|
|
|
+mk.data.sendXYEvent("hutuiEventLaunch_" + t.nebulaAppId, "互推启动" + t.title);
|
|
|
+return null;
|
|
|
+}
|
|
|
+if (s.default.isFileExist(a)) {
|
|
|
+s.default.installApk(a);
|
|
|
return null;
|
|
|
}
|
|
|
if (e.downLoadTaskMap[t.nebulaAppId]) {
|
|
|
@@ -14323,23 +14328,25 @@ mk.tip.pop("正在下载中...");
|
|
|
return null;
|
|
|
}
|
|
|
mk.tip.pop("开始下载...");
|
|
|
-var r = new u(0, 0, t.nebulaAppId, null), c = s.default.downFile2Local(a, t.nebulaAppId + ".apk", function() {
|
|
|
-r.progress = -2;
|
|
|
-n.sendAppDownloadLog(t.nebulaAppId);
|
|
|
+var c = new u(0, 0, t.nebulaAppId, null), l = s.default.downFile2Local(i, t.nebulaAppId + ".apk", function() {
|
|
|
+c.progress = -2;
|
|
|
+o.sendAppDownloadLog(t.nebulaAppId);
|
|
|
setTimeout(function() {
|
|
|
-s.default.installApk(o);
|
|
|
+s.default.installApk(a);
|
|
|
}, 1);
|
|
|
}, function() {
|
|
|
-r.progress = -1;
|
|
|
+c.progress = -1;
|
|
|
e.downLoadTaskMap[t.nebulaAppId] = null;
|
|
|
mk.tip.pop("下载失败,请稍后再试");
|
|
|
}, function(t, e, n) {
|
|
|
-r.progress = e;
|
|
|
-r.totalBytesReceives = n;
|
|
|
+c.progress = e;
|
|
|
+c.totalBytesReceives = n;
|
|
|
});
|
|
|
-r.downloadTask = c;
|
|
|
-e.downLoadTaskMap[t.nebulaAppId] = r;
|
|
|
-return r;
|
|
|
+c.downloadTask = l;
|
|
|
+e.downLoadTaskMap[t.nebulaAppId] = c;
|
|
|
+mk.data.sendXYEvent("hutuiEventDown_" + t.nebulaAppId, "互推下载" + t.title);
|
|
|
+mk.data.sendXYEvent("hutuiEventFrom_" + n, "互推下载途径");
|
|
|
+return c;
|
|
|
};
|
|
|
e.prototype.getTaskInfo = function(t) {
|
|
|
return e.downLoadTaskMap[t];
|
|
|
@@ -14631,7 +14638,7 @@ this.cool = !0;
|
|
|
this.scheduleOnce(function() {
|
|
|
t.cool = !1;
|
|
|
}, 3);
|
|
|
-1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data) ? this.schedule(function() {
|
|
|
+1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data, 4) ? this.schedule(function() {
|
|
|
t.showDownloadProgress();
|
|
|
}, .5) : this.progressLabel.string = "" : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
|
|
|
}
|
|
|
@@ -14724,7 +14731,7 @@ this.cool = !0;
|
|
|
this.scheduleOnce(function() {
|
|
|
t.cool = !1;
|
|
|
}, 3);
|
|
|
-1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data) && this.schedule(function() {
|
|
|
+1 == this.data.appType ? null != gData.moreGame.createNewTask(this.data, 3) && this.schedule(function() {
|
|
|
t.showDownloadProgress();
|
|
|
}, .5) : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
|
|
|
}
|
|
|
@@ -14813,7 +14820,7 @@ mk.audio.playEffect("button");
|
|
|
if (!this.cool) {
|
|
|
this.cool = !0;
|
|
|
mk.data.sendDataEvent(c.DataEventId.hutuiFunction, "互推插屏下载");
|
|
|
-1 == this.data.appType ? r.default.ifCanStartGame(this.data.packageName, !0) || gData.moreGame.createNewTask(this.data) : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
|
|
|
+1 == this.data.appType ? r.default.ifCanStartGame(this.data.packageName, !0) || gData.moreGame.createNewTask(this.data, 1) : 2 == this.data.appType && cc.sys.openURL(this.data.recommendLink);
|
|
|
gData.moreGame.popNodeGetRedBag();
|
|
|
}
|
|
|
};
|
|
|
@@ -17153,6 +17160,7 @@ e.storageKey_startCountEndTime = "startCountEndTime";
|
|
|
e.levelRedBagItemArr = [];
|
|
|
e.curLevelLeftTime = 0;
|
|
|
e.storageKey_levelCountEndTime = "levelCountEndTime";
|
|
|
+e.curShowTipIndex = [];
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.init = function() {
|
|
|
@@ -17175,6 +17183,8 @@ t == r.RedBagItemType.StartUI ? n = this.startRedBagItemArr : t == r.RedBagItemT
|
|
|
if (n.length > 1) {
|
|
|
var o = n.indexOf(e);
|
|
|
-1 != o && n.splice(o, 1);
|
|
|
+e.hide();
|
|
|
+mk.storage.setStorage(e.stroageKey, 1);
|
|
|
}
|
|
|
};
|
|
|
e.prototype.checkOfflineTime = function() {
|
|
|
@@ -17182,7 +17192,6 @@ var t = new Date().getTime(), e = mk.storage.getStorage(this.storageKey_startCou
|
|
|
e && (o = Math.floor(.001 * (e - t))) >= 5 && this.startCountDown(r.RedBagItemType.StartUI, o);
|
|
|
var n = mk.storage.getStorage(this.storageKey_levelCountEndTime);
|
|
|
if (n) {
|
|
|
-console.log("==[ levelCountEndDate", n, n - t);
|
|
|
var o;
|
|
|
(o = Math.floor(.001 * (n - t))) >= 5 && this.startCountDown(r.RedBagItemType.LevelUI, o);
|
|
|
}
|
|
|
@@ -17239,11 +17248,17 @@ e.prototype.reset = function() {
|
|
|
for (var t = 0; t < this.startRedBagItemArr.length; t++) this.startRedBagItemArr[t].reset();
|
|
|
for (t = 0; t < this.levelRedBagItemArr.length; t++) this.levelRedBagItemArr[t].reset();
|
|
|
};
|
|
|
-e.prototype.showTip = function(t) {
|
|
|
-var e = [];
|
|
|
-t == r.RedBagItemType.StartUI ? e = this.startRedBagItemArr : t == r.RedBagItemType.LevelUI && (e = this.levelRedBagItemArr);
|
|
|
-var n = e.length;
|
|
|
-e[mk.math.random(0, n - 1)].showTip();
|
|
|
+e.prototype.showTip = function(t, e) {
|
|
|
+void 0 === e && (e = -1);
|
|
|
+if (-1 == e || -1 != this.curShowTipIndex.indexOf(e)) {
|
|
|
+var n = [];
|
|
|
+t == r.RedBagItemType.StartUI ? n = this.startRedBagItemArr : t == r.RedBagItemType.LevelUI && (n = this.levelRedBagItemArr);
|
|
|
+var o = n.length, a = n[mk.math.random(0, o)];
|
|
|
+if (a) {
|
|
|
+a.showTip();
|
|
|
+this.curShowTipIndex.push(a.index);
|
|
|
+}
|
|
|
+}
|
|
|
};
|
|
|
e.prototype.showNewTip = function() {};
|
|
|
return i([ s ], e);
|
|
|
@@ -17424,7 +17439,9 @@ var o = mk.storage.getStorage(this.stroageKey);
|
|
|
o && 1 == o ? this.scheduleOnce(function() {
|
|
|
t.hide();
|
|
|
}, .01) : gData.redBagData.addRedBagItem(this.type, this);
|
|
|
-2 != this.index && 6 != this.index || gData.redBagData.showTip(this.type);
|
|
|
+2 != this.index && 6 != this.index || this.scheduleOnce(function() {
|
|
|
+gData.redBagData.showTip(t.type);
|
|
|
+}, .1);
|
|
|
};
|
|
|
e.prototype.reset = function() {
|
|
|
mk.storage.setStorage(this.stroageKey, 0);
|
|
|
@@ -17456,11 +17473,9 @@ return [ 4, mk.ui.openPanel("module/reward/rewardLuck", l.OpenActionType.normal)
|
|
|
case 3:
|
|
|
t.sent();
|
|
|
this.callBack();
|
|
|
-this.hide();
|
|
|
-mk.storage.setStorage(this.stroageKey, 1);
|
|
|
gData.redBagData.removeRedBagItem(this.type, this);
|
|
|
gData.redBagData.startCountDown(this.type, gData.redBagData.countTotalTime);
|
|
|
-gData.redBagData.showTip(this.type);
|
|
|
+gData.redBagData.showTip(this.type, this.index);
|
|
|
t.label = 4;
|
|
|
|
|
|
case 4:
|
|
|
@@ -18561,11 +18576,13 @@ mk.ui.openPanel("module/redBagCash/redBagCash");
|
|
|
e.prototype.clickNextMission = function() {
|
|
|
this.checkIfClearLevelScore();
|
|
|
l.default.Inst.nextLevel();
|
|
|
+mk.ad.destoryBanner();
|
|
|
};
|
|
|
e.prototype.clickBack = function() {
|
|
|
this.checkIfClearLevelScore();
|
|
|
l.default.Inst.restart();
|
|
|
l.default.Inst.node.active = !1;
|
|
|
+mk.ad.destoryBanner();
|
|
|
};
|
|
|
e.prototype.onDestroy = function() {
|
|
|
this.cur_stage === s.none && mk.audio.playEffect("rewardClose");
|