|
@@ -1,4 +1,4 @@
|
|
|
-! function() {
|
|
|
+! function () {
|
|
|
"use strict";
|
|
|
class t {
|
|
|
static getHost() {
|
|
@@ -46,7 +46,7 @@
|
|
|
n = window,
|
|
|
r = n["XML" + this.hKey + "Request"];
|
|
|
if (r ? a = new r : n.ActiveXObject && (a = new ActiveXObject("Microsoft.XML" + this.hKey.toUpperCase())), !a) return console.log("sender is null"), void s(null);
|
|
|
- a.onload = function() {
|
|
|
+ a.onload = function () {
|
|
|
if (200 == a.status) {
|
|
|
if (a.responseText && "" != a.responseText) {
|
|
|
let t;
|
|
@@ -71,16 +71,16 @@
|
|
|
for ((t = new Uint8Array(n << 2)).set(new Uint8Array(a.buffer)), t = new Uint32Array(t.buffer), i = new DataView(t.buffer), e = 0; e < n; e++) t[e] = i.getUint32(e << 2);
|
|
|
t[a.length >> 2] |= 128 << 24 - 8 * (3 & a.length), t[n - 1] = a.length << 3;
|
|
|
var r = [],
|
|
|
- o = [function() {
|
|
|
+ o = [function () {
|
|
|
return l[1] & l[2] | ~l[1] & l[3]
|
|
|
- }, function() {
|
|
|
+ }, function () {
|
|
|
return l[1] ^ l[2] ^ l[3]
|
|
|
- }, function() {
|
|
|
+ }, function () {
|
|
|
return l[1] & l[2] | l[1] & l[3] | l[2] & l[3]
|
|
|
- }, function() {
|
|
|
+ }, function () {
|
|
|
return l[1] ^ l[2] ^ l[3]
|
|
|
}],
|
|
|
- h = function(t, e) {
|
|
|
+ h = function (t, e) {
|
|
|
return t << e | t >>> 32 - e
|
|
|
},
|
|
|
d = [1518500249, 1859775393, -1894007588, -899497514],
|
|
@@ -92,7 +92,7 @@
|
|
|
}
|
|
|
i = new DataView(new Uint32Array(l).buffer);
|
|
|
for (let t = 0; t < 5; t++) l[t] = i.getUint32(t << 2);
|
|
|
- return Array.prototype.map.call(new Uint8Array(new Uint32Array(l).buffer), function(t) {
|
|
|
+ return Array.prototype.map.call(new Uint8Array(new Uint32Array(l).buffer), function (t) {
|
|
|
return (t < 16 ? "0" : "") + t.toString(16)
|
|
|
}).join("")
|
|
|
}
|
|
@@ -301,14 +301,14 @@
|
|
|
}
|
|
|
}
|
|
|
var o, h;
|
|
|
- ! function(t) {
|
|
|
+ ! function (t) {
|
|
|
t.total = "total", t.month = "month", t.week = "week", t.day = "day"
|
|
|
}(o || (o = {}));
|
|
|
class d {
|
|
|
constructor() {
|
|
|
this.ttVideoId = "", this.ttBannerId = "", this.ttInsertId = "", this.opVideoId = "", this.opBannerId = "", this.opNativeId = "", this.vvVideoId = "", this.vvBannerId = "", this.vvInsertId = "", this.vvNativeId = "", this.mzVideoId = "", this.mzBannerId = "", this.mzInsertId = "", this.wxVideoId = "", this.wxBannerId = "", this.wxInsertId = "", this.qqVideoId = "", this.qqBannerId = "", this.qqInsertId = "", this.qqBoxId = "", this.qqBlockId = "", this.hwVideoId = "", this.hwBannerId = "", this.hwInsertId = "", this.ksVideoId = "", this.ksBannerId = "", this.ksInsertId = ""
|
|
|
}
|
|
|
- }! function(t) {
|
|
|
+ } ! function (t) {
|
|
|
t[t.web = 0] = "web", t[t.tt = 1] = "tt", t[t.op = 2] = "op", t[t.vv = 3] = "vv", t[t.mz = 4] = "mz", t[t.wx = 5] = "wx", t[t.qq = 6] = "qq", t[t.f399 = 7] = "f399", t[t.ks = 8] = "ks", t[t.hw = 9] = "hw", t[t.xm = 10] = "xm", t[t.csj = 11] = "csj", t[t.mmy = 12] = "mmy", t[t.xmApk = 13] = "xmApk", t[t.vvApk = 14] = "vvApk", t[t.ios = 15] = "ios", t[t.t33 = 16] = "t33", t[t.hwkb = 17] = "hwkb", t[t.opApk = 18] = "opApk", t[t.hhw = 19] = "hhw", t[t.f399Apk = 20] = "f399Apk", t[t.ttApk = 21] = "ttApk", t[t.a233 = 22] = "a233"
|
|
|
}(h || (h = {}));
|
|
|
class l {
|
|
@@ -316,6 +316,7 @@
|
|
|
this.authUser = !1, this.userId = "", this.realName = "", this.realCode = "", this.age = 0, this.nickName = "", this.headIcon = "", this.openId = "", this.focused = !1, this.curDate = 0, this.curWeek = 0, this.createTime = 0, this.gameTime = 999, this.fcmDate = 0, this.minScore = 0, this.loginCount = 0, this.adScusNum = 0, this.adFailNum = 0
|
|
|
}
|
|
|
saveData(t) {
|
|
|
+ console.log('zh: saveData ' + t);
|
|
|
let e = {};
|
|
|
for (let t in this) e[t.toString()] = this[t];
|
|
|
localStorage.setItem("moyudata_" + t, JSON.stringify(e))
|
|
@@ -345,7 +346,11 @@
|
|
|
init(e) {
|
|
|
if (t.debug = e, this.moyuUser = new a, this.data = new l, this.nativeInfo = new r, this.data.getData(this.myId), this.data.userId.length < 2) {
|
|
|
let e = this.getRandStr(5);
|
|
|
- this.data.headIcon = t.getTagro("headimg/0.jpg"), this.data.userId = "my" + this.myId + e, this.data.nickName = "player_" + e, this.data.loginCount = 1, this.data.createTime = this.getTime()
|
|
|
+ //zh:用户默认昵称
|
|
|
+ this.data.headIcon = t.getTagro("headimg/0.jpg");
|
|
|
+ this.data.userId = "my" + this.myId + e;
|
|
|
+ this.data.nickName = "player_" + e;
|
|
|
+ this.data.loginCount = 1; this.data.createTime = this.getTime();
|
|
|
} else this.data.loginCount++;
|
|
|
this.moyuUser.loginCount = this.data.loginCount, this.moyuUser.userId = this.data.userId, this.moyuUser.nickName = this.data.nickName, this.moyuUser.headIcon = this.data.headIcon, this.moyuUser.openId = this.data.openId, this.moyuUser.createTime = this.data.createTime, this.moyuUser.videoCount = [this.data.adScusNum, this.data.adFailNum], this.moyuUser.realName = this.data.realName, this.moyuUser.realCode = this.data.realCode, this.moyuUser.age = this.data.age, this.setGameTime(), this.data.saveData(this.myId)
|
|
|
}
|
|
@@ -453,7 +458,7 @@
|
|
|
this.moyuUser.headIcon = t.icon, this.moyuUser.nickName = t.userName, this.moyuUser.openId = t.uId;
|
|
|
break;
|
|
|
default:
|
|
|
- console.log("该平台没有用户信息")
|
|
|
+ console.log("zh:该平台没有用户信息")
|
|
|
}
|
|
|
this.moyuUser.userId = this.data.userId, this.moyuUser.isAuth = !0, this.data.authUser = !0, this.data.openId = this.moyuUser.openId, this.data.nickName = this.moyuUser.nickName, this.data.headIcon = this.moyuUser.headIcon, this.saveData()
|
|
|
}
|
|
@@ -511,15 +516,15 @@
|
|
|
} else this.nativeInfo.icon = "", this.nativeInfo.image = "";
|
|
|
this.onNativeCall && this.onNativeCall(), this.onNativeCall = null
|
|
|
}
|
|
|
- getUserInfo(t) {}
|
|
|
+ getUserInfo(t) { }
|
|
|
oppoSign(t, e, s, i, a) {
|
|
|
let r = {
|
|
|
- appKey: t,
|
|
|
- appSecret: e,
|
|
|
- pkgName: s,
|
|
|
- timeStamp: a,
|
|
|
- token: i
|
|
|
- },
|
|
|
+ appKey: t,
|
|
|
+ appSecret: e,
|
|
|
+ pkgName: s,
|
|
|
+ timeStamp: a,
|
|
|
+ token: i
|
|
|
+ },
|
|
|
o = "";
|
|
|
for (const t in r) {
|
|
|
let e = r[t];
|
|
@@ -550,7 +555,7 @@
|
|
|
let t = null;
|
|
|
this.sdk.getLaunchOptionsSync && (t = this.sdk.getLaunchOptionsSync()), t && (u.platOptions = t), this.subLoader = this.sdk.loadSubpackage
|
|
|
}
|
|
|
- initApp(t) {}
|
|
|
+ initApp(t) { }
|
|
|
initAds() {
|
|
|
if (!this.sdk || !this.sdk.getSystemInfoSync) return;
|
|
|
let e = this.sdk.getSystemInfoSync(),
|
|
@@ -560,16 +565,16 @@
|
|
|
initUser(t, e = !1) {
|
|
|
t && t()
|
|
|
}
|
|
|
- getOpenId(t) {}
|
|
|
+ getOpenId(t) { }
|
|
|
getLocation(t) {
|
|
|
t && t()
|
|
|
}
|
|
|
- userAgree(t) {}
|
|
|
- onAdMsg(t) {}
|
|
|
+ userAgree(t) { }
|
|
|
+ onAdMsg(t) { }
|
|
|
onUserInfo(t) {
|
|
|
this.userCall && this.userCall()
|
|
|
}
|
|
|
- showMoreGame() {}
|
|
|
+ showMoreGame() { }
|
|
|
createAudio() {
|
|
|
if (this.sdk.createInnerAudioContext) return this.sdk.createInnerAudioContext();
|
|
|
u.platLog("audio is null")
|
|
@@ -578,22 +583,22 @@
|
|
|
let t = this.sdk.getSystemInfoSync && this.sdk.getSystemInfoSync();
|
|
|
t && (u.platWidth = t.screenWidth ? t.screenWidth : 750, u.platHeight = t.screenHeight ? t.screenHeight : 1334)
|
|
|
}
|
|
|
- exit() {}
|
|
|
+ exit() { }
|
|
|
addLnk(t) {
|
|
|
t && t()
|
|
|
}
|
|
|
- focus(t) {}
|
|
|
- shareGame(t, e, s) {}
|
|
|
- recordeGame(t, e) {}
|
|
|
- recordPause(t) {}
|
|
|
- recordeStart() {}
|
|
|
+ focus(t) { }
|
|
|
+ shareGame(t, e, s) { }
|
|
|
+ recordeGame(t, e) { }
|
|
|
+ recordPause(t) { }
|
|
|
+ recordeStart() { }
|
|
|
recordeEnd(t) {
|
|
|
t && t()
|
|
|
}
|
|
|
- showBlock(t) {}
|
|
|
- showBox() {}
|
|
|
- sendDataEvent(t, e) {}
|
|
|
- toVideoView(t) {}
|
|
|
+ showBlock(t) { }
|
|
|
+ showBox() { }
|
|
|
+ sendDataEvent(t, e) { }
|
|
|
+ toVideoView(t) { }
|
|
|
vibrate(t) {
|
|
|
this.sdk && (t && this.sdk.vibrateLong ? this.sdk.vibrateLong() : this.sdk.vibrateShort && this.sdk.vibrateShort())
|
|
|
}
|
|
@@ -646,9 +651,9 @@
|
|
|
u.platError(10211, t)
|
|
|
}), u.bannerAd.onLoad(() => {
|
|
|
this.setBannerPos(), u.bannerShow ? 0 == this.bannerType && u.bannerAd.show() : u.bannerAd.hide()
|
|
|
- }), u.bannerAd.onClose && u.bannerAd.onClose(function() {
|
|
|
+ }), u.bannerAd.onClose && u.bannerAd.onClose(function () {
|
|
|
u.onBannerHide()
|
|
|
- }), u.bannerAd.onHide && u.bannerAd.onHide(function() {
|
|
|
+ }), u.bannerAd.onHide && u.bannerAd.onHide(function () {
|
|
|
u.onBannerHide()
|
|
|
}), u.platLog("BannerAd inited")
|
|
|
}
|
|
@@ -726,7 +731,7 @@
|
|
|
adUnitId: t
|
|
|
}), u.nativeAd && (u.nativeAd.onError(t => {
|
|
|
this.setNative(!0), u.onNativeLoad(null), u.platError(10231, t)
|
|
|
- }), u.nativeAd.onLoad(function(t) {
|
|
|
+ }), u.nativeAd.onLoad(function (t) {
|
|
|
let e = t.adList.pop();
|
|
|
u.platLog("native onload"), u.onNativeLoad(e), u.nativeAd.reportAdShow({
|
|
|
adId: u.nativeInfo.id
|
|
@@ -771,25 +776,25 @@
|
|
|
p.Inst.platName = t.appName, "Douyin" != t.appName && "douyin_lite" != t.appName || (p.Inst.isDouyin = !0)
|
|
|
}
|
|
|
}), this.initRecoder(), this.sdk.checkShortcut && this.sdk.checkShortcut({
|
|
|
- success: function(t) {
|
|
|
+ success: function (t) {
|
|
|
p.Inst.hasShortCut = t.status.exist
|
|
|
},
|
|
|
- fail: function(t) {
|
|
|
+ fail: function (t) {
|
|
|
p.Inst.platLog("Shortcut失败", t), p.Inst.hasShortCut = !0
|
|
|
}
|
|
|
}), this.sdk.onShareAppMessage(e => {
|
|
|
const s = {
|
|
|
- title: t.shareTitle,
|
|
|
- imageUrl: t.shareImg,
|
|
|
- extra: {},
|
|
|
- query: t.shareQuery,
|
|
|
- success(t) {
|
|
|
- p.Inst.platLog("分享成功", t)
|
|
|
- },
|
|
|
- fail(t) {
|
|
|
- p.Inst.platLog("分享失败", t), p.Inst.showTip(20301)
|
|
|
- }
|
|
|
+ title: t.shareTitle,
|
|
|
+ imageUrl: t.shareImg,
|
|
|
+ extra: {},
|
|
|
+ query: t.shareQuery,
|
|
|
+ success(t) {
|
|
|
+ p.Inst.platLog("分享成功", t)
|
|
|
},
|
|
|
+ fail(t) {
|
|
|
+ p.Inst.platLog("分享失败", t), p.Inst.showTip(20301)
|
|
|
+ }
|
|
|
+ },
|
|
|
i = Object.assign({
|
|
|
channel: e.channel
|
|
|
}, s);
|
|
@@ -828,7 +833,7 @@
|
|
|
title: " iOS不支持"
|
|
|
})
|
|
|
}
|
|
|
- getOpenId() {}
|
|
|
+ getOpenId() { }
|
|
|
initUser(t, e) {
|
|
|
this.sdk ? (this.sdk.getSetting({
|
|
|
success: s => {
|
|
@@ -874,10 +879,10 @@
|
|
|
}
|
|
|
addLnk(t) {
|
|
|
this.sdk ? this.sdk.addShortcut({
|
|
|
- success: function(e) {
|
|
|
+ success: function (e) {
|
|
|
p.Inst.hasShortCut = !0, t && t()
|
|
|
},
|
|
|
- fail: function(t) {
|
|
|
+ fail: function (t) {
|
|
|
p.Inst.hasShortCut = !1
|
|
|
}
|
|
|
}) : t && t(!0)
|
|
@@ -968,11 +973,11 @@
|
|
|
i()
|
|
|
}) : i()
|
|
|
}
|
|
|
- getToken(t, e, s) {}
|
|
|
+ getToken(t, e, s) { }
|
|
|
toVideoView(t) {
|
|
|
t.length < 2 || this.sdk.navigateToVideoView({
|
|
|
videoId: t,
|
|
|
- success: t => {},
|
|
|
+ success: t => { },
|
|
|
fail: t => {
|
|
|
p.Inst.platLog("toVideoView fail:", t), 1006 === t.errCode && this.sdk.showToast({
|
|
|
title: "something wrong with your network"
|
|
@@ -985,10 +990,10 @@
|
|
|
init() {
|
|
|
if (this.sdk || (this.sdk = window.qg), !this.sdk) return void p.Inst.platError(10001);
|
|
|
this.subLoader = this.sdk.loadSubpackage, this.sdk.getLaunchOptionsSync().referrerInfo, this.sdk.hasShortcutInstalled({
|
|
|
- success: function(t) {
|
|
|
+ success: function (t) {
|
|
|
0 == t && (p.Inst.hasShortCut = !1)
|
|
|
},
|
|
|
- fail: function(t) {
|
|
|
+ fail: function (t) {
|
|
|
p.Inst.hasShortCut = !1, p.Inst.platLog("ShortCut出错", t)
|
|
|
}
|
|
|
}), super.init()
|
|
@@ -1003,20 +1008,20 @@
|
|
|
}
|
|
|
addLnk(t) {
|
|
|
this.sdk && this.sdk.installShortcut({
|
|
|
- success: function() {
|
|
|
+ success: function () {
|
|
|
p.Inst.platLog("ShortCut成功"), p.Inst.hasShortCut = !0, t && t()
|
|
|
},
|
|
|
- fail: function(t) {
|
|
|
+ fail: function (t) {
|
|
|
p.Inst.platError(10301, t)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
initUser(t) {
|
|
|
this.sdk.login({
|
|
|
- success: function(e) {
|
|
|
+ success: function (e) {
|
|
|
p.Inst.platCode = e.data.token, p.Inst.appSecret.length > 1 ? p.Inst.getUserInfo(t) : (p.Inst.initUser(e.data), t && t(!0))
|
|
|
},
|
|
|
- fail: function(t) {
|
|
|
+ fail: function (t) {
|
|
|
p.Inst.platError(10011, t)
|
|
|
}
|
|
|
})
|
|
@@ -1026,7 +1031,7 @@
|
|
|
class f extends c {
|
|
|
init() {
|
|
|
this.sdk || (this.sdk = window.qg), this.sdk ? (this.subLoader = this.sdk.loadSubpackage, this.sdk.hasShortcutInstalled({
|
|
|
- success: function(t) {
|
|
|
+ success: function (t) {
|
|
|
I.hasShortCut = !!t
|
|
|
}
|
|
|
}), super.init()) : I.platError(10001)
|
|
@@ -1043,10 +1048,10 @@
|
|
|
}
|
|
|
addLnk(t) {
|
|
|
this.sdk && this.sdk.installShortcut({
|
|
|
- success: function() {
|
|
|
+ success: function () {
|
|
|
I.platLog("ShortCut成功"), I.hasShortCut = !0, t && t()
|
|
|
},
|
|
|
- fail: function(t) {
|
|
|
+ fail: function (t) {
|
|
|
I.platError(10301, t), I.hasShortCut = !1
|
|
|
}
|
|
|
})
|
|
@@ -1060,7 +1065,7 @@
|
|
|
I.platError(10211, t)
|
|
|
}), I.bannerAd.onLoad(() => {
|
|
|
I.bannerShow ? I.bannerAd.show() : I.bannerAd.hide()
|
|
|
- }), I.bannerAd.onClose(function() {
|
|
|
+ }), I.bannerAd.onClose(function () {
|
|
|
I.onBannerHide()
|
|
|
}))
|
|
|
}
|
|
@@ -1163,7 +1168,7 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- getOpenId() {}
|
|
|
+ getOpenId() { }
|
|
|
onShare() {
|
|
|
this.shared || (this.shared = !0, this.shareCall && (p.Inst.getTime() - this.shareTime < 3100 ? this.shareCall(!1) : this.shareCall(!0)))
|
|
|
}
|
|
@@ -1208,10 +1213,10 @@
|
|
|
}
|
|
|
getData(s) {
|
|
|
let i = e.Inst.codeMsg("bc48cbce46946057", {
|
|
|
- appKey: 100,
|
|
|
- platform: "web",
|
|
|
- settingIndex: 0
|
|
|
- }),
|
|
|
+ appKey: 100,
|
|
|
+ platform: "web",
|
|
|
+ settingIndex: 0
|
|
|
+ }),
|
|
|
a = t.getUrl("app/setting-get-new?", i);
|
|
|
e.Inst.sendGet(a, t => {
|
|
|
if (t && 0 == t.code && t.data) {
|
|
@@ -1295,7 +1300,7 @@
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- getOpenId() {}
|
|
|
+ getOpenId() { }
|
|
|
onShare() {
|
|
|
this.shared || (this.shared = !0, this.shareCall && (p.Inst.getTime() - this.shareTime < 3100 ? this.shareCall(!1) : this.shareCall(!0)))
|
|
|
}
|
|
@@ -1324,7 +1329,7 @@
|
|
|
left: 12,
|
|
|
top: e - 100
|
|
|
}
|
|
|
- }), !p.Inst.blockAd || !p.Inst.blockAd.onError) return p.Inst.platLog("blockAd is null"), void(p.Inst.blockAd = null);
|
|
|
+ }), !p.Inst.blockAd || !p.Inst.blockAd.onError) return p.Inst.platLog("blockAd is null"), void (p.Inst.blockAd = null);
|
|
|
p.Inst.blockAd.onError(t => {
|
|
|
p.Inst.platError(10241, t)
|
|
|
}), p.Inst.blockAd.onLoad(() => {
|
|
@@ -1338,7 +1343,7 @@
|
|
|
showBlock(t) {
|
|
|
p.Inst.blockAd && (p.Inst.blockAd.hide(), p.Inst.blockAd.destroy(), p.Inst.blockAd = null), t && this.initBlock()
|
|
|
}
|
|
|
- createCash(t, e) {}
|
|
|
+ createCash(t, e) { }
|
|
|
}
|
|
|
class w extends c {
|
|
|
constructor() {
|
|
@@ -1346,7 +1351,7 @@
|
|
|
}
|
|
|
init() {
|
|
|
this.sdk = window.ks, this.sdk ? (this.subLoader = this.sdk.loadSubpackage, this.initRecoder(), this.sdk.login({
|
|
|
- success(t) {},
|
|
|
+ success(t) { },
|
|
|
fail(t) {
|
|
|
p.Inst.platLog("ks login fail", t)
|
|
|
}
|
|
@@ -1409,7 +1414,7 @@
|
|
|
this.recorder ? (this.recordDelta = p.Inst.getTime(), p.Inst.platLog("recordeGame", this.recordDelta), this.recorder.start()) : p.Inst.platError(10401, "recorder is null")
|
|
|
}
|
|
|
recordeEnd(t) {
|
|
|
- if (this.recordCall = t, this.recordloop && p.Inst.shareMp4.length > 0 && p.Inst.getTime() - this.recordDelta < 5e3) return this.recordDelta = 0, this.recordloop = !1, this.recordCall && this.recordCall(), void(this.recorder && this.recorder.pause());
|
|
|
+ if (this.recordCall = t, this.recordloop && p.Inst.shareMp4.length > 0 && p.Inst.getTime() - this.recordDelta < 5e3) return this.recordDelta = 0, this.recordloop = !1, this.recordCall && this.recordCall(), void (this.recorder && this.recorder.pause());
|
|
|
this.recordloop = !1, this.recordDelta = 0, this.recorder && this.recorder.stop()
|
|
|
}
|
|
|
shareGame(e, s) {
|
|
@@ -1424,7 +1429,7 @@
|
|
|
})) : p.Inst.platLog("无法分享:", p.Inst.shareMp4)
|
|
|
}
|
|
|
initRecoder() {
|
|
|
- this.recorder = this.sdk.getGameRecorder(), this.recorder.on("start", () => {}), this.recorder.on("error", t => {
|
|
|
+ this.recorder = this.sdk.getGameRecorder(), this.recorder.on("start", () => { }), this.recorder.on("error", t => {
|
|
|
p.Inst.platLog("recorder error", t)
|
|
|
}), this.recorder.on("stop", t => {
|
|
|
t && t.videoID ? (p.Inst.platLog("record stop", t.videoID), p.Inst.shareMp4 = t.videoID, this.recordCall && this.recordCall(), this.recordloop && setTimeout(() => {
|
|
@@ -1529,7 +1534,7 @@
|
|
|
}
|
|
|
}
|
|
|
var U;
|
|
|
- ! function(t) {
|
|
|
+ ! function (t) {
|
|
|
t.adDataId = "AdStatis", t.gameLogin = "GameLogin", t.gameStart = "GameStart", t.gameEnd = "GameEnd"
|
|
|
}(U || (U = {}));
|
|
|
let C = p.Inst,
|
|
@@ -1626,8 +1631,8 @@
|
|
|
return !!this.isPlat(h.ttApk) && !this.isRealName
|
|
|
}
|
|
|
authenticate(e, s, i) {
|
|
|
- if (!this.isName(e) || !this.isID(s)) return void(i && i(!1));
|
|
|
- if (!(C.realName ? C.getRandom(0, 100) < C.realName : this.isLegal) || this.isVoidPlat) return C.onRealName(e, s), void(i && i(!0));
|
|
|
+ if (!this.isName(e) || !this.isID(s)) return void (i && i(!1));
|
|
|
+ if (!(C.realName ? C.getRandom(0, 100) < C.realName : this.isLegal) || this.isVoidPlat) return C.onRealName(e, s), void (i && i(!0));
|
|
|
let a = t.getUrl("real-info/enter"),
|
|
|
n = this.getUserInfo(),
|
|
|
r = {
|
|
@@ -1669,7 +1674,7 @@
|
|
|
2 == (2 & C.markBit) && this.sendEvent(U.gameEnd, {
|
|
|
id: t,
|
|
|
res: e
|
|
|
- }), C.getTime() - this.lastVideoTime > 3e4 && C.getRandom(0, 100) < C.autoAd && this.showVideoAd(() => {}, 0)
|
|
|
+ }), C.getTime() - this.lastVideoTime > 3e4 && C.getRandom(0, 100) < C.autoAd && this.showVideoAd(() => { }, 0)
|
|
|
}
|
|
|
needRealTime(e = !0) {
|
|
|
t.realTime = e, M.getNetTime()
|
|
@@ -1844,18 +1849,18 @@
|
|
|
}
|
|
|
loadSubRes(t, e) {
|
|
|
let s = this.platform;
|
|
|
- return new Promise(function(i) {
|
|
|
+ return new Promise(function (i) {
|
|
|
s && s.subLoader || (C.platLog("平台无分包"), i(!0));
|
|
|
var a = s.subLoader({
|
|
|
name: t,
|
|
|
- success: function() {
|
|
|
+ success: function () {
|
|
|
C.platLog(t + "完成"), i(!0)
|
|
|
},
|
|
|
- fail: function(t) {
|
|
|
+ fail: function (t) {
|
|
|
C.platError(10121, t), i(!1)
|
|
|
}
|
|
|
});
|
|
|
- e && a.onProgressUpdate(function(t) {
|
|
|
+ e && a.onProgressUpdate(function (t) {
|
|
|
let s = t.progress > 1 ? .01 * t.progress : t.progress;
|
|
|
e(s)
|
|
|
})
|
|
@@ -1907,7 +1912,7 @@
|
|
|
t && (this.recordTime += e - this.recordMark), this.recordMark = e, this.platform.recordPause(t)
|
|
|
}
|
|
|
recordEnd(t, e) {
|
|
|
- if (this.isVoidPlat) return C.platLog("测试录屏完成"), void(e && e.apply(t));
|
|
|
+ if (this.isVoidPlat) return C.platLog("测试录屏完成"), void (e && e.apply(t));
|
|
|
let s = this.getTime();
|
|
|
this.recordTime += s - this.recordMark, this.platform.recordeEnd(() => {
|
|
|
e && e.apply(t, [C.shareMp4])
|
|
@@ -2144,14 +2149,14 @@
|
|
|
} else this.platform.vibrate(t >= 400)
|
|
|
}
|
|
|
waitNext() {
|
|
|
- return new Promise(function(t) {
|
|
|
+ return new Promise(function (t) {
|
|
|
requestAnimationFrame(() => {
|
|
|
t()
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
waitFrames(t) {
|
|
|
- return new Promise(function(e) {
|
|
|
+ return new Promise(function (e) {
|
|
|
let s = t + 1,
|
|
|
i = !0;
|
|
|
setInterval(() => {
|
|
@@ -2162,7 +2167,7 @@
|
|
|
})
|
|
|
}
|
|
|
waitSeconds(t) {
|
|
|
- return new Promise(function(e) {
|
|
|
+ return new Promise(function (e) {
|
|
|
setTimeout(() => {
|
|
|
e()
|
|
|
}, 1e3 * t)
|