e9a1cfcb-79e1-4655-a685-57ab68b79701.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. "use strict";
  2. cc._RF.push(module, 'e9a1c/LeeFGVaaFV6tot5cB', 'YZ_Tool_4399');
  3. // common-plugin/Scripts/YZ_Tool_4399.ts
  4. "use strict";
  5. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  6. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  7. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  8. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  9. return c > 3 && r && Object.defineProperty(target, key, r), r;
  10. };
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var PlatUtils_1 = require("./PlatUtils");
  13. var Utils_1 = require("./Utils");
  14. var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
  15. //<script src="http://h.api.4399.com/h5mini-2.0/h5api-interface.php"></script>
  16. /**
  17. * uc工具类
  18. */
  19. var YZ_Tool_4399 = /** @class */ (function () {
  20. function YZ_Tool_4399() {
  21. //@ts-ignore
  22. this._4399 = window.h5api;
  23. this._sysInfo = {};
  24. /**
  25. * 服务器配置信息
  26. */
  27. this._serverConfig = null;
  28. }
  29. Object.defineProperty(YZ_Tool_4399.prototype, "SysInfo", {
  30. get: function () {
  31. return this._sysInfo;
  32. },
  33. enumerable: false,
  34. configurable: true
  35. });
  36. Object.defineProperty(YZ_Tool_4399.prototype, "ServerConfig", {
  37. get: function () {
  38. return this._serverConfig;
  39. },
  40. enumerable: false,
  41. configurable: true
  42. });
  43. /**
  44. *
  45. * @param data 配置数据
  46. */
  47. YZ_Tool_4399.prototype.init = function (data) {
  48. if (PlatUtils_1.default.Is4399) {
  49. // if (data) {
  50. // let configObj: any = JSON.parse(data);
  51. // if (configObj && configObj.uc) {
  52. // ST_DefaultServerConfig = JSON.stringify(configObj.uc);
  53. // }
  54. // }
  55. Utils_1.utils.showLog("4399 h5 平台初始化完成 >>");
  56. Utils_1.utils.emitServerInitEvent();
  57. }
  58. };
  59. YZ_Tool_4399.prototype.share = function (callBack) {
  60. this._4399.share();
  61. callBack && callBack(true, "");
  62. };
  63. /**
  64. * 显示推荐弹窗
  65. */
  66. YZ_Tool_4399.prototype.showRecommend = function () {
  67. this._4399.showRecommend();
  68. };
  69. YZ_Tool_4399 = __decorate([
  70. ccclass
  71. ], YZ_Tool_4399);
  72. return YZ_Tool_4399;
  73. }());
  74. exports.default = YZ_Tool_4399;
  75. cc._RF.pop();