5e69e88b7f137ec9ca81b0f8b241ebde0595b431.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. System.register(["cc"], function (_export, _context) {
  2. "use strict";
  3. var _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, native, sys, PlatformDefault, _crd;
  4. return {
  5. setters: [function (_cc) {
  6. _cclegacy = _cc.cclegacy;
  7. __checkObsolete__ = _cc.__checkObsolete__;
  8. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  9. native = _cc.native;
  10. sys = _cc.sys;
  11. }],
  12. execute: function () {
  13. _crd = true;
  14. _cclegacy._RF.push({}, "8bc71in2KdBv7OXj86n3Sph", "PlatformDefault", undefined);
  15. __checkObsolete__(['native', 'sys']);
  16. PlatformDefault = class PlatformDefault {
  17. initialize() {
  18. console.log('初始化默认广告框架');
  19. }
  20. showToast(param) {
  21. console.log('显示toast ', param);
  22. }
  23. shareAppMessage(param) {
  24. if (param === void 0) {
  25. param = {};
  26. }
  27. console.log('分享 ', param);
  28. }
  29. vibrateShort(param) {
  30. if (param === void 0) {
  31. param = {};
  32. }
  33. console.log('短震动 ', param);
  34. }
  35. vibrateLong(param) {
  36. if (param === void 0) {
  37. param = {};
  38. }
  39. console.log('长震动 ', param);
  40. }
  41. shareShowReward(handler) {
  42. if (handler === void 0) {
  43. handler = null;
  44. }
  45. console.log('直接执行分享回调');
  46. if (handler) handler();
  47. }
  48. addDesk(handler) {
  49. if (handler === void 0) {
  50. handler = null;
  51. }
  52. console.log('添加到桌面回调');
  53. if (handler) handler();
  54. }
  55. showRewardVideo(handler) {
  56. if (handler === void 0) {
  57. handler = null;
  58. }
  59. console.log('直接执行视频回调');
  60. if (sys.platform == sys.Platform.ANDROID) {
  61. //安卓
  62. native.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "videoAd", "()V"); //msgHints.show("移动客户端模拟视频点击成功!");
  63. if (handler) handler(true); //设置原生回调
  64. /*globalThis.videoCallback = function(status) {
  65. if (handler) handler(status);
  66. };*/
  67. } else if (sys.platform == sys.Platform.IOS) {
  68. //苹果
  69. native.reflection.callStaticMethod("AppController", "videoAd", ''); //msgHints.show("移动客户端模拟视频点击成功!");
  70. if (handler) handler(true); //设置原生回调
  71. /*globalThis.videoCallback = function(status) {
  72. if (handler) handler(status);
  73. };*/
  74. } else {
  75. //msgHints.show("非移动客户端模拟视频点击成功!");
  76. if (handler) handler(true);
  77. }
  78. }
  79. showBannerAd() {
  80. console.log('显示banner广告');
  81. }
  82. hideBannerAd(recreate) {
  83. if (recreate === void 0) {
  84. recreate = false;
  85. }
  86. console.log('隐藏banner广告,刷新:', recreate);
  87. }
  88. refreshBannerAd() {
  89. console.log('刷新banner广告');
  90. }
  91. showInterstitialAd() {
  92. console.log('显示插屏广告');
  93. }
  94. showCustomAd() {
  95. console.log('显示自定义广告');
  96. }
  97. hideCustomAd() {
  98. console.log('隐藏自定义广告');
  99. }
  100. showSigleCustomAd() {
  101. console.log('展示单个自定义广告');
  102. }
  103. hideSigleCustomAd() {
  104. console.log('隐藏展示单个自定义广告');
  105. }
  106. exitGame() {
  107. console.log('退出游戏');
  108. }
  109. __createVideoAd() {
  110. console.log('创建视频广告');
  111. }
  112. __createBannerAd() {
  113. console.log('创建banner广告');
  114. }
  115. __createInterstitialAd() {
  116. console.log('创建插屏广告');
  117. }
  118. __customAdExist() {
  119. console.log('格子广告是否存在');
  120. }
  121. /**
  122. * 是否支持添加桌面
  123. * @returns
  124. */
  125. isSupportDesk() {
  126. return false;
  127. }
  128. };
  129. _export("default", new PlatformDefault());
  130. _cclegacy._RF.pop();
  131. _crd = false;
  132. }
  133. };
  134. });
  135. //# sourceMappingURL=5e69e88b7f137ec9ca81b0f8b241ebde0595b431.js.map