|
|
@@ -1029,12 +1029,124 @@ function o() {
|
|
|
this.constructor = t;
|
|
|
}
|
|
|
t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
|
|
|
+}), i = this && this.__awaiter || function(t, e, o, n) {
|
|
|
+return new (o || (o = Promise))(function(a, i) {
|
|
|
+function r(t) {
|
|
|
+try {
|
|
|
+s(n.next(t));
|
|
|
+} catch (t) {
|
|
|
+i(t);
|
|
|
+}
|
|
|
+}
|
|
|
+function c(t) {
|
|
|
+try {
|
|
|
+s(n.throw(t));
|
|
|
+} catch (t) {
|
|
|
+i(t);
|
|
|
+}
|
|
|
+}
|
|
|
+function s(t) {
|
|
|
+t.done ? a(t.value) : (e = t.value, e instanceof o ? e : new o(function(t) {
|
|
|
+t(e);
|
|
|
+})).then(r, c);
|
|
|
+var e;
|
|
|
+}
|
|
|
+s((n = n.apply(t, e || [])).next());
|
|
|
});
|
|
|
+}, r = this && this.__generator || function(t, e) {
|
|
|
+var o, n, a, i, r = {
|
|
|
+label: 0,
|
|
|
+sent: function() {
|
|
|
+if (1 & a[0]) throw a[1];
|
|
|
+return a[1];
|
|
|
+},
|
|
|
+trys: [],
|
|
|
+ops: []
|
|
|
+};
|
|
|
+return i = {
|
|
|
+next: c(0),
|
|
|
+throw: c(1),
|
|
|
+return: c(2)
|
|
|
+}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
|
|
|
+return this;
|
|
|
+}), i;
|
|
|
+function c(t) {
|
|
|
+return function(e) {
|
|
|
+return s([ t, e ]);
|
|
|
+};
|
|
|
+}
|
|
|
+function s(i) {
|
|
|
+if (o) throw new TypeError("Generator is already executing.");
|
|
|
+for (;r; ) try {
|
|
|
+if (o = 1, n && (a = 2 & i[0] ? n.return : i[0] ? n.throw || ((a = n.return) && a.call(n),
|
|
|
+0) : n.next) && !(a = a.call(n, i[1])).done) return a;
|
|
|
+(n = 0, a) && (i = [ 2 & i[0], a.value ]);
|
|
|
+switch (i[0]) {
|
|
|
+case 0:
|
|
|
+case 1:
|
|
|
+a = i;
|
|
|
+break;
|
|
|
+
|
|
|
+case 4:
|
|
|
+r.label++;
|
|
|
+return {
|
|
|
+value: i[1],
|
|
|
+done: !1
|
|
|
+};
|
|
|
+
|
|
|
+case 5:
|
|
|
+r.label++;
|
|
|
+n = i[1];
|
|
|
+i = [ 0 ];
|
|
|
+continue;
|
|
|
+
|
|
|
+case 7:
|
|
|
+i = r.ops.pop();
|
|
|
+r.trys.pop();
|
|
|
+continue;
|
|
|
+
|
|
|
+default:
|
|
|
+if (!(a = r.trys, a = a.length > 0 && a[a.length - 1]) && (6 === i[0] || 2 === i[0])) {
|
|
|
+r = 0;
|
|
|
+continue;
|
|
|
+}
|
|
|
+if (3 === i[0] && (!a || i[1] > a[0] && i[1] < a[3])) {
|
|
|
+r.label = i[1];
|
|
|
+break;
|
|
|
+}
|
|
|
+if (6 === i[0] && r.label < a[1]) {
|
|
|
+r.label = a[1];
|
|
|
+a = i;
|
|
|
+break;
|
|
|
+}
|
|
|
+if (a && r.label < a[2]) {
|
|
|
+r.label = a[2];
|
|
|
+r.ops.push(i);
|
|
|
+break;
|
|
|
+}
|
|
|
+a[2] && r.ops.pop();
|
|
|
+r.trys.pop();
|
|
|
+continue;
|
|
|
+}
|
|
|
+i = e.call(t, r);
|
|
|
+} catch (t) {
|
|
|
+i = [ 6, t ];
|
|
|
+n = 0;
|
|
|
+} finally {
|
|
|
+o = a = 0;
|
|
|
+}
|
|
|
+if (5 & i[0]) throw i[1];
|
|
|
+return {
|
|
|
+value: i[0] ? i[1] : void 0,
|
|
|
+done: !0
|
|
|
+};
|
|
|
+}
|
|
|
+};
|
|
|
Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
o.InterAdState = void 0;
|
|
|
-var i, r = t("../../zgSingleton"), c = t("./ATSDKMgr"), s = function(t) {
|
|
|
+var c, s = t("../../zgSingleton"), l = t("./ATSDKMgr"), p = function(t) {
|
|
|
a(e, t);
|
|
|
function e() {
|
|
|
var e = null !== t && t.apply(this, arguments) || this;
|
|
|
@@ -1043,39 +1155,62 @@ e.ifLoadShowArr = new Array();
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.init = function() {
|
|
|
+return i(this, void 0, void 0, function() {
|
|
|
+var t;
|
|
|
+return r(this, function(e) {
|
|
|
+switch (e.label) {
|
|
|
+case 0:
|
|
|
this.ATInterstitialJS = cc.ATInterstitialJS;
|
|
|
this.ATInterstitialJS.proxy = this;
|
|
|
this.ATInterstitialJS.init();
|
|
|
-for (var t = 0; t < 3; t++) {
|
|
|
-this.interAdStateArr[t] = i.Unload;
|
|
|
+t = 2;
|
|
|
+e.label = 1;
|
|
|
+
|
|
|
+case 1:
|
|
|
+if (!(t >= 0)) return [ 3, 4 ];
|
|
|
+this.interAdStateArr[t] = c.Unload;
|
|
|
this.loadInter(t);
|
|
|
+return [ 4, mk.time.WaitForSeconds(1) ];
|
|
|
+
|
|
|
+case 2:
|
|
|
+e.sent();
|
|
|
+e.label = 3;
|
|
|
+
|
|
|
+case 3:
|
|
|
+t--;
|
|
|
+return [ 3, 1 ];
|
|
|
+
|
|
|
+case 4:
|
|
|
+return [ 2 ];
|
|
|
}
|
|
|
+});
|
|
|
+});
|
|
|
};
|
|
|
e.prototype.getPlaceIDByType = function(t) {
|
|
|
var e = "";
|
|
|
switch (t) {
|
|
|
case 0:
|
|
|
-e = c.default.topon_inter_placementId;
|
|
|
+e = l.default.topon_inter_placementId;
|
|
|
break;
|
|
|
|
|
|
case 1:
|
|
|
-e = c.default.topon_fullinter_placementId;
|
|
|
+e = l.default.topon_fullinter_placementId;
|
|
|
break;
|
|
|
|
|
|
case 2:
|
|
|
-e = c.default.topon_biginter_placementId;
|
|
|
+e = l.default.topon_biginter_placementId;
|
|
|
}
|
|
|
return e;
|
|
|
};
|
|
|
e.prototype.checkPlacementIDType = function(t) {
|
|
|
if (cc.sys.os === cc.sys.OS_IOS) {
|
|
|
-if (t == c.default.topon_inter_placementId) return 0;
|
|
|
-if (t == c.default.topon_fullinter_placementId) return 1;
|
|
|
-if (t == c.default.topon_biginter_placementId) return 2;
|
|
|
+if (t == l.default.topon_inter_placementId) return 0;
|
|
|
+if (t == l.default.topon_fullinter_placementId) return 1;
|
|
|
+if (t == l.default.topon_biginter_placementId) return 2;
|
|
|
} else if (cc.sys.os === cc.sys.OS_ANDROID) {
|
|
|
-if (t == c.default.topon_inter_placementId) return 0;
|
|
|
-if (t == c.default.topon_fullinter_placementId) return 1;
|
|
|
-if (t == c.default.topon_biginter_placementId) return 2;
|
|
|
+if (t == l.default.topon_inter_placementId) return 0;
|
|
|
+if (t == l.default.topon_fullinter_placementId) return 1;
|
|
|
+if (t == l.default.topon_biginter_placementId) return 2;
|
|
|
}
|
|
|
};
|
|
|
e.prototype.hasAdReady = function(t) {
|
|
|
@@ -1083,39 +1218,40 @@ return this.ATInterstitialJS.hasAdReady(this.getPlaceIDByType(t));
|
|
|
};
|
|
|
e.prototype.loadInter = function(t, e) {
|
|
|
void 0 === e && (e = !1);
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "loadInter " + t);
|
|
|
this.ifLoadShowArr[t] = e;
|
|
|
-this.interAdStateArr[t] = i.Loading;
|
|
|
+this.interAdStateArr[t] = c.Loading;
|
|
|
var o = this.getPlaceIDByType(t);
|
|
|
this.ATInterstitialJS.loadInter(o);
|
|
|
};
|
|
|
e.prototype.showInter = function(t) {
|
|
|
-if (this.interAdStateArr[t] == i.Show) console.log("当前插屏类型正在展示"); else {
|
|
|
-mk.console.logSingle("inter ", "showInter " + t);
|
|
|
+if (this.interAdStateArr[t] == c.Show) console.log("当前插屏类型正在展示"); else {
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "showInter " + t);
|
|
|
if (this.hasAdReady(t)) {
|
|
|
-this.interAdStateArr[t] = i.Show;
|
|
|
+this.interAdStateArr[t] = c.Show;
|
|
|
this.ATInterstitialJS.showInter(this.getPlaceIDByType(t));
|
|
|
-} else this.interAdStateArr[t] == i.Loading ? this.ifLoadShowArr[t] = !0 : this.loadInter(t, !0);
|
|
|
+} else this.interAdStateArr[t] == c.Loading ? this.ifLoadShowArr[t] = !0 : this.loadInter(t, !0);
|
|
|
}
|
|
|
};
|
|
|
e.prototype.onInterstitialAdLoaded = function(t) {
|
|
|
var e = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[e] = i.LoadSuccess;
|
|
|
-mk.console.logSingle("inter ", "onInterstitialAdLoaded " + e);
|
|
|
+this.interAdStateArr[e] = c.LoadSuccess;
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdLoaded " + e);
|
|
|
this.ifLoadShowArr[e] && this.showInter(e);
|
|
|
};
|
|
|
e.prototype.onInterstitialAdLoadFail = function(t) {
|
|
|
var e = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[e] = i.LoadFail;
|
|
|
+this.interAdStateArr[e] = c.LoadFail;
|
|
|
var o = 11;
|
|
|
-mk.console.logSingle("inter ", "onInterstitialAdLoadFail " + e);
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdLoadFail " + e);
|
|
|
0 == e ? o = 11 : 1 == e && (o = 10);
|
|
|
gData.adData.updateADLog(o, t);
|
|
|
};
|
|
|
e.prototype.onInterstitialAdShow = function(t, e) {
|
|
|
var o = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[o] = i.Show;
|
|
|
+this.interAdStateArr[o] = c.Show;
|
|
|
var n = JSON.parse(e), a = 2;
|
|
|
-mk.console.logSingle("inter ", "onInterstitialAdShow " + o);
|
|
|
+mk.console.logSingle("ATInterstitialJS ", "onInterstitialAdShow " + o);
|
|
|
0 == o ? a = 2 : 1 == o && (a = 9);
|
|
|
gData.adData.updateADLog(a, t, n);
|
|
|
this.loadInter(o);
|
|
|
@@ -1123,7 +1259,7 @@ this.loadInter(o);
|
|
|
e.prototype.onInterstitialAdClick = function() {};
|
|
|
e.prototype.onInterstitialAdClose = function(t, e) {
|
|
|
var o = this.checkPlacementIDType(t);
|
|
|
-this.interAdStateArr[o] = i.Close;
|
|
|
+this.interAdStateArr[o] = c.Close;
|
|
|
if (0 == o) ; else if (1 == o) {
|
|
|
var n = JSON.parse(e);
|
|
|
gData.adData.updateADLog(8, t, n);
|
|
|
@@ -1134,8 +1270,8 @@ mk.console.logSingle("onInterstitialAdFailedToPlayVideo placementId >> ", t);
|
|
|
mk.console.logSingle("onInterstitialAdFailedToPlayVideo ", e);
|
|
|
};
|
|
|
return e;
|
|
|
-}(r.zgSingleton);
|
|
|
-o.default = s;
|
|
|
+}(s.zgSingleton);
|
|
|
+o.default = p;
|
|
|
(function(t) {
|
|
|
t[t.Unload = 0] = "Unload";
|
|
|
t[t.Loading = 1] = "Loading";
|
|
|
@@ -1143,7 +1279,7 @@ t[t.LoadSuccess = 2] = "LoadSuccess";
|
|
|
t[t.LoadFail = 3] = "LoadFail";
|
|
|
t[t.Show = 4] = "Show";
|
|
|
t[t.Close = 5] = "Close";
|
|
|
-})(i = o.InterAdState || (o.InterAdState = {}));
|
|
|
+})(c = o.InterAdState || (o.InterAdState = {}));
|
|
|
cc._RF.pop();
|
|
|
}, {
|
|
|
"../../zgSingleton": "zgSingleton",
|
|
|
@@ -10536,14 +10672,14 @@ Object.defineProperty(o, "__esModule", {
|
|
|
value: !0
|
|
|
});
|
|
|
o.Fun = void 0;
|
|
|
-var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/PigBankData"), d = t("./module/TurnableData"), h = t("./module/SignData"), f = t("./module/FissionData"), y = t("./AdData"), g = t("./module/RewardData"), m = t("./module/CashNormalData"), _ = t("./module/ReceiptNoticeData"), v = t("./module/BlessingBagData"), b = t("./module/CashProData"), D = t("./module/RedBagCashData"), w = t("./module/RedCodeData"), S = t("./module/RedeemData"), A = t("./module/MoreGameData"), P = t("./module/SettingData"), k = t("./module/GuideData"), O = t("./module/GuideWeakData"), R = t("./ConfigData"), I = t("./module/NewCashUIData"), T = t("../../before/view/data/ADUnlockData"), C = t("../../before/view/data/PlantData"), N = t("../../before/main/FarmSystem"), x = t("../../before/view/data/HarvestData"), j = t("../../before/view/data/ADClearSickData"), F = t("../../before/main/PastureSystem"), M = t("../../before/main/FactorySystem"), B = t("./module/FarmMapData"), L = t("./module/GradeRewardData"), E = function() {
|
|
|
+var n, a = t("./AppData"), i = t("./GameData"), r = t("./HttpData"), c = t("./LoginData"), s = t("./StorageData"), l = t("./WechatData"), p = t("./module/HelpData"), u = t("./module/PigBankData"), d = t("./module/TurnableData"), h = t("./module/SignData"), f = t("./module/FissionData"), y = t("./AdData"), g = t("./module/RewardData"), m = t("./module/CashNormalData"), _ = t("./module/ReceiptNoticeData"), v = t("./module/BlessingBagData"), b = t("./module/CashProData"), D = t("./module/RedBagCashData"), w = t("./module/RedCodeData"), S = t("./module/RedeemData"), A = t("./module/MoreGameData"), P = t("./module/SettingData"), k = t("./module/GuideData"), O = t("./module/GuideWeakData"), I = t("./ConfigData"), R = t("./module/NewCashUIData"), T = t("../../before/view/data/ADUnlockData"), C = t("../../before/view/data/PlantData"), N = t("../../before/main/FarmSystem"), x = t("../../before/view/data/HarvestData"), j = t("../../before/view/data/ADClearSickData"), F = t("../../before/main/PastureSystem"), M = t("../../before/main/FactorySystem"), B = t("./module/FarmMapData"), L = t("./module/GradeRewardData"), E = function() {
|
|
|
function t() {
|
|
|
this.init();
|
|
|
}
|
|
|
t.prototype.init = function() {
|
|
|
this.appData = new a.AppData();
|
|
|
this.loginData = new c.LoginData();
|
|
|
-this.configData = new R.ConfigData();
|
|
|
+this.configData = new I.ConfigData();
|
|
|
this.gameData = new i.GameData();
|
|
|
this.wechatData = new l.WechatData();
|
|
|
this.httpData = new r.HttpData();
|
|
|
@@ -10566,7 +10702,7 @@ this.blessingBag = new v.BlessingBagData();
|
|
|
this.cashPro = new b.default();
|
|
|
this.redCodeData = new w.default();
|
|
|
this.redeem = new S.default();
|
|
|
-this.newCashUiData = new I.NewCashUIData();
|
|
|
+this.newCashUiData = new R.NewCashUIData();
|
|
|
this.adUnlockData = new T.default();
|
|
|
this.plantData = new C.default();
|
|
|
this.harvestData = new x.default();
|
|
|
@@ -11468,6 +11604,7 @@ this._maxProduct.length <= 0 && (this._maxProduct = this.getProp(i.maxProduct));
|
|
|
};
|
|
|
t.prototype.initProductTimes = function() {
|
|
|
this._productMakeTimesData = this.getProp(i.productMakeTimes);
|
|
|
+this._productMakeTimesData || (this._productMakeTimesData = []);
|
|
|
for (var t = this._productMakeTimesData.length, e = 0; e < t; e++) this._productMakeTimesMap.set(this._productMakeTimesData[e].id, this._productMakeTimesData[e].times);
|
|
|
};
|
|
|
t.prototype.checkGradeUpUnLock = function() {
|
|
|
@@ -14131,6 +14268,7 @@ return e ? [ 4, gData.adData.watchVideo(s.AdFun.harvest) ] : [ 3, 3 ];
|
|
|
|
|
|
case 1:
|
|
|
t.sent();
|
|
|
+gData.harvestData.setToEmpty();
|
|
|
return [ 4, gData.farmGradeData.addGradeExp(l.ExpAddType.EAT_harvest) ];
|
|
|
|
|
|
case 2:
|
|
|
@@ -16526,13 +16664,13 @@ configurable: !0
|
|
|
});
|
|
|
Object.defineProperty(t.prototype, "component", {
|
|
|
get: function() {
|
|
|
-return this._component || (this._component = new R());
|
|
|
+return this._component || (this._component = new I());
|
|
|
},
|
|
|
enumerable: !1,
|
|
|
configurable: !0
|
|
|
});
|
|
|
return t;
|
|
|
-}(), R = function() {
|
|
|
+}(), I = function() {
|
|
|
function t() {}
|
|
|
Object.defineProperty(t.prototype, "setGray", {
|
|
|
get: function() {
|