|
|
@@ -10558,7 +10558,8 @@ return jsb.fileUtils.getWritablePath();
|
|
|
};
|
|
|
t.callStaticMethod = function(t, e, n) {
|
|
|
for (var i, a = [], r = 3; r < arguments.length; r++) a[r - 3] = arguments[r];
|
|
|
-(i = jsb.reflection).callStaticMethod.apply(i, o([ t, e, n ], a));
|
|
|
+var c = (i = jsb.reflection).callStaticMethod.apply(i, o([ t, e, n ], a));
|
|
|
+return c;
|
|
|
};
|
|
|
t.backTest = function() {};
|
|
|
t.updateDeviceInfo = function(t) {
|
|
|
@@ -10632,7 +10633,12 @@ cc.sys.os == cc.sys.OS_ANDROID ? this.callStaticMethod(this._JSB_ANDROID_PATH, "
|
|
|
};
|
|
|
t.ifCanStartGame = function(t, e) {
|
|
|
var n = !1;
|
|
|
-cc.sys.os == cc.sys.OS_ANDROID ? n = this.callStaticMethod(this._JSB_ANDROID_PATH, "isStartGame", "(Ljava/lang/String;Z)Z", t, e) : cc.sys.os == cc.sys.OS_IOS && (n = this.callStaticMethod("GameConfig", "installApk:", ""));
|
|
|
+if (cc.sys.os == cc.sys.OS_ANDROID) {
|
|
|
+n = this.callStaticMethod(this._JSB_ANDROID_PATH, "isStartGame", "(Ljava/lang/String;Z)Z", t, e);
|
|
|
+console.log("aaaaaaaaaaa >>> ", n);
|
|
|
+return n;
|
|
|
+}
|
|
|
+cc.sys.os == cc.sys.OS_IOS && (n = this.callStaticMethod("GameConfig", "installApk:", ""));
|
|
|
return n;
|
|
|
};
|
|
|
t.setTAEventRegister = function() {
|
|
|
@@ -12798,17 +12804,21 @@ e.btnOpen = null;
|
|
|
e.labName = null;
|
|
|
e.labDes = null;
|
|
|
e.spRed = null;
|
|
|
-e.bData = null;
|
|
|
e.data = null;
|
|
|
e.cool = !1;
|
|
|
return e;
|
|
|
}
|
|
|
e.prototype.setItemData = function(t) {
|
|
|
return r(this, void 0, void 0, function() {
|
|
|
-var e = this;
|
|
|
return c(this, function() {
|
|
|
-this.bData = t;
|
|
|
-this.data = t.item_data;
|
|
|
+this.setInfo(t.item_data);
|
|
|
+return [ 2 ];
|
|
|
+});
|
|
|
+});
|
|
|
+};
|
|
|
+e.prototype.setInfo = function(t) {
|
|
|
+var e = this;
|
|
|
+this.data = t;
|
|
|
cc.loader.load(this.data.icon, function(t, n) {
|
|
|
if (t) console.log("err:", t); else if (cc.isValid(e.iconNode)) {
|
|
|
var o = n;
|
|
|
@@ -12818,7 +12828,10 @@ e.iconNode.spriteFrame = new cc.SpriteFrame(o);
|
|
|
this.labName.string = this.data.title;
|
|
|
this.labDes.string = this.data.introduction;
|
|
|
this.spRed.active = !1;
|
|
|
-if (1 == this.data.appType) if (s.default.ifCanStartGame(this.data.packageName, !1)) {
|
|
|
+if (1 == this.data.appType) {
|
|
|
+console.log("aaaaaa this.data.packageName ", this.data.packageName);
|
|
|
+console.log("aaaaaa ", s.default.ifCanStartGame(this.data.packageName, !1));
|
|
|
+if (s.default.ifCanStartGame(this.data.packageName, !1)) {
|
|
|
this.btnDown.active = !1;
|
|
|
this.btnOpen.active = !0;
|
|
|
} else if (s.default.isFileExist(this.data.nebulaAppId + ".apk")) {
|
|
|
@@ -12830,13 +12843,11 @@ this.btnOpen.active = !1;
|
|
|
null != gData.moreGame.getTaskInfo(this.data.nebulaAppId) ? this.schedule(function() {
|
|
|
e.showDownloadProgress();
|
|
|
}, .5) : this.progressLabel.string = "下载";
|
|
|
+}
|
|
|
} else if (2 == this.data.appType) {
|
|
|
this.btnDown.active = !1;
|
|
|
this.btnOpen.active = !0;
|
|
|
}
|
|
|
-return [ 2 ];
|
|
|
-});
|
|
|
-});
|
|
|
};
|
|
|
e.prototype.creatorDownLoadTask = function() {
|
|
|
var t = this;
|
|
|
@@ -12853,7 +12864,7 @@ t.showDownloadProgress();
|
|
|
};
|
|
|
e.prototype.showDownloadProgress = function() {
|
|
|
var t = gData.moreGame.getTaskInfo(this.data.nebulaAppId);
|
|
|
-null != t && t.progress >= 0 ? this.progressLabel.string = (t.progress / t.totalBytesReceives * 100).toFixed(1) + "%" : this.setItemData(this.bData);
|
|
|
+null != t && t.progress >= 0 ? this.progressLabel.string = (t.progress / t.totalBytesReceives * 100).toFixed(1) + "%" : this.setInfo(this.data);
|
|
|
};
|
|
|
a([ p(cc.Sprite) ], e.prototype, "iconNode", void 0);
|
|
|
a([ p(cc.Label) ], e.prototype, "progressLabel", void 0);
|