9de97b6b366ebccd18de90526f04c993513cf0d7.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Sprite, Label, ListItem, ResUtil, i18n, _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor, _descriptor2, _descriptor3, _crd, ccclass, property, StoreItem;
  4. function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
  5. function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
  6. function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
  7. function _reportPossibleCrUseOfListItem(extras) {
  8. _reporterNs.report("ListItem", "../../third/ListItem", _context.meta, extras);
  9. }
  10. function _reportPossibleCrUseOfResUtil(extras) {
  11. _reporterNs.report("ResUtil", "../../utils/ResUtil", _context.meta, extras);
  12. }
  13. function _reportPossibleCrUseOfi18n(extras) {
  14. _reporterNs.report("i18n", "../../core/i18n/runtime-scripts/LanguageData", _context.meta, extras);
  15. }
  16. return {
  17. setters: [function (_unresolved_) {
  18. _reporterNs = _unresolved_;
  19. }, function (_cc) {
  20. _cclegacy = _cc.cclegacy;
  21. __checkObsolete__ = _cc.__checkObsolete__;
  22. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  23. _decorator = _cc._decorator;
  24. Sprite = _cc.Sprite;
  25. Label = _cc.Label;
  26. }, function (_unresolved_2) {
  27. ListItem = _unresolved_2.default;
  28. }, function (_unresolved_3) {
  29. ResUtil = _unresolved_3.ResUtil;
  30. }, function (_unresolved_4) {
  31. i18n = _unresolved_4.default;
  32. }],
  33. execute: function () {
  34. _crd = true;
  35. _cclegacy._RF.push({}, "390ceHQHaxHOp6g08qalaRU", "StoreItem", undefined);
  36. __checkObsolete__(['_decorator', 'Sprite', 'Label']);
  37. ({
  38. ccclass,
  39. property
  40. } = _decorator); //商店数据
  41. _export("StoreItem", StoreItem = (_dec = ccclass('StoreItem'), _dec2 = property({
  42. type: Sprite,
  43. tooltip: "道具图标"
  44. }), _dec3 = property({
  45. type: Label,
  46. tooltip: "道具描述"
  47. }), _dec4 = property({
  48. type: Label,
  49. tooltip: "看广告的次数"
  50. }), _dec(_class = (_class2 = class StoreItem extends (_crd && ListItem === void 0 ? (_reportPossibleCrUseOfListItem({
  51. error: Error()
  52. }), ListItem) : ListItem) {
  53. constructor() {
  54. super(...arguments);
  55. _initializerDefineProperty(this, "s_icon", _descriptor, this);
  56. _initializerDefineProperty(this, "s_des_lable", _descriptor2, this);
  57. _initializerDefineProperty(this, "video_label", _descriptor3, this);
  58. this.data = null;
  59. this.cb = null;
  60. }
  61. /**
  62. * 看视频
  63. */
  64. clikItemVideo() {
  65. var _this$cb;
  66. if (!this.data) return;
  67. (_this$cb = this.cb) == null || _this$cb.call(this, this.data, this.s_icon.node);
  68. }
  69. /**
  70. * 数据填充
  71. * @param data 数据
  72. * @param cb 回调
  73. */
  74. init(data, cb) {
  75. if (!data) return;
  76. this.data = data;
  77. this.cb = cb; //敌人投降
  78. (_crd && ResUtil === void 0 ? (_reportPossibleCrUseOfResUtil({
  79. error: Error()
  80. }), ResUtil) : ResUtil).setSpriteFrame(data.icon, this.s_icon); //道具描述
  81. this.s_des_lable.string = (_crd && i18n === void 0 ? (_reportPossibleCrUseOfi18n({
  82. error: Error()
  83. }), i18n) : i18n).isZh ? data.des : data.des_lang; //看广告的次数
  84. this.video_label.string = data.price_2 + "/" + data.alreadyVideo;
  85. }
  86. }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "s_icon", [_dec2], {
  87. configurable: true,
  88. enumerable: true,
  89. writable: true,
  90. initializer: null
  91. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "s_des_lable", [_dec3], {
  92. configurable: true,
  93. enumerable: true,
  94. writable: true,
  95. initializer: null
  96. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "video_label", [_dec4], {
  97. configurable: true,
  98. enumerable: true,
  99. writable: true,
  100. initializer: null
  101. })), _class2)) || _class));
  102. _cclegacy._RF.pop();
  103. _crd = false;
  104. }
  105. };
  106. });
  107. //# sourceMappingURL=9de97b6b366ebccd18de90526f04c993513cf0d7.js.map