123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- System.register(["__unresolved_0", "cc", "__unresolved_1"], function (_export, _context) {
- "use strict";
- var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Constants, PlatformBrowser, _crd, ccclass, property;
- function _reportPossibleCrUseOfConstants(extras) {
- _reporterNs.report("Constants", "../data/Constants", _context.meta, extras);
- }
- return {
- setters: [function (_unresolved_) {
- _reporterNs = _unresolved_;
- }, function (_cc) {
- _cclegacy = _cc.cclegacy;
- __checkObsolete__ = _cc.__checkObsolete__;
- __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
- _decorator = _cc._decorator;
- }, function (_unresolved_2) {
- Constants = _unresolved_2.Constants;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "eb6c844IflGH4yGRmIDs+NM", "PlatformBrowser", undefined);
- __checkObsolete__(['_decorator']);
- ({
- ccclass,
- property
- } = _decorator);
- PlatformBrowser = class PlatformBrowser {
- constructor() {
- this.adInstance = null;
- this.gtag = null;
- this.openAd = true;
- }
- initialize() {
- this.adInstance = window['adInstance'];
- try {
- var _window$__woso, _window$__woso$TopCal;
- (_window$__woso = window["__woso"]) == null || (_window$__woso$TopCal = _window$__woso["TopCallback"]) == null || _window$__woso$TopCal.call(_window$__woso);
- } catch (error) {}
- console.log('web ads sdk初始化');
- }
- /**显示插屏广告*/
- showInterstitialAd(cb) {
- if ((_crd && Constants === void 0 ? (_reportPossibleCrUseOfConstants({
- error: Error()
- }), Constants) : Constants).isDebug) {
- console.log('模拟显示插屏广告回调');
- cb == null || cb();
- return;
- }
- try {
- window['showAd']('interstitial').then(() => {
- console.log("rewarded11111");
- }).catch(() => {// GtagMgr.inst.doGameDot(GtagType.ad_error);
- });
- } catch (error) {// tgxUITips.show('The ad failed to load')
- }
- }
- /** 显示激励广告*/
- showRewardVideo(cb) {
- if ((_crd && Constants === void 0 ? (_reportPossibleCrUseOfConstants({
- error: Error()
- }), Constants) : Constants).isDebug) {
- console.log('模拟激励广告回调');
- cb == null || cb(1);
- return;
- }
- try {
- window["showAd"]('rewarded').then(() => {
- if (cb) cb(1);
- }).catch(() => {//上报信息
- // GtagMgr.inst.doGameDot(GtagType.ad_error);
- // cb && cb();
- });
- return;
- } catch (error) {} //tgxUITips.show('The ads failed to load');
- }
- /** 显示激励广告*/
- hideBannerAd() {}
- showBannerAd() {}
- vibrateShort() {}
- };
- _export("default", new PlatformBrowser());
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=62ee506e0f57064b502a58971d90f4f5591e8ce5.js.map
|