e1147a79464be3722bfd2a8f7d71b0aa13cfba5c.js 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2"], function (_export, _context) {
  2. "use strict";
  3. var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, Label, Sprite, SpriteFrame, UI_Head_Icon, ch, _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _crd, ccclass, property, UI_Rank_Item;
  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 _reportPossibleCrUseOfUI_Head_Icon(extras) {
  8. _reporterNs.report("UI_Head_Icon", "../UI/UI_Head_Icon", _context.meta, extras);
  9. }
  10. function _reportPossibleCrUseOfch(extras) {
  11. _reporterNs.report("ch", "../../../ch/ch", _context.meta, extras);
  12. }
  13. return {
  14. setters: [function (_unresolved_) {
  15. _reporterNs = _unresolved_;
  16. }, function (_cc) {
  17. _cclegacy = _cc.cclegacy;
  18. __checkObsolete__ = _cc.__checkObsolete__;
  19. __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
  20. _decorator = _cc._decorator;
  21. Component = _cc.Component;
  22. Label = _cc.Label;
  23. Sprite = _cc.Sprite;
  24. SpriteFrame = _cc.SpriteFrame;
  25. }, function (_unresolved_2) {
  26. UI_Head_Icon = _unresolved_2.UI_Head_Icon;
  27. }, function (_unresolved_3) {
  28. ch = _unresolved_3.ch;
  29. }],
  30. execute: function () {
  31. _crd = true;
  32. _cclegacy._RF.push({}, "ac170vYiRpERZJoeSznhVhO", "UI_Rank_Item", undefined);
  33. __checkObsolete__(['_decorator', 'Component', 'Label', 'Node', 'Sprite', 'SpriteFrame']);
  34. ({
  35. ccclass,
  36. property
  37. } = _decorator);
  38. _export("UI_Rank_Item", UI_Rank_Item = (_dec = ccclass('UI_Rank_Item'), _dec2 = property(Sprite), _dec3 = property([SpriteFrame]), _dec4 = property(Sprite), _dec5 = property([SpriteFrame]), _dec6 = property(Label), _dec7 = property(_crd && UI_Head_Icon === void 0 ? (_reportPossibleCrUseOfUI_Head_Icon({
  39. error: Error()
  40. }), UI_Head_Icon) : UI_Head_Icon), _dec8 = property(Label), _dec9 = property(Label), _dec(_class = (_class2 = class UI_Rank_Item extends Component {
  41. constructor() {
  42. super(...arguments);
  43. _initializerDefineProperty(this, "Bg", _descriptor, this);
  44. _initializerDefineProperty(this, "Bgs", _descriptor2, this);
  45. _initializerDefineProperty(this, "Medal", _descriptor3, this);
  46. _initializerDefineProperty(this, "Medals", _descriptor4, this);
  47. _initializerDefineProperty(this, "Num", _descriptor5, this);
  48. _initializerDefineProperty(this, "Head_Icon", _descriptor6, this);
  49. _initializerDefineProperty(this, "Name", _descriptor7, this);
  50. _initializerDefineProperty(this, "Level", _descriptor8, this);
  51. }
  52. showInfo(index, type, data, me) {
  53. var _data$score;
  54. if (!data) {
  55. this.node.active = false;
  56. return;
  57. }
  58. this.node.active = true;
  59. if (me) {
  60. this.Bg.spriteFrame = this.Bgs[4];
  61. index <= 3 ? this.Medal.spriteFrame = this.Medals[index - 1] : this.Medal.spriteFrame = this.Medals[3];
  62. } else {
  63. index <= 3 ? this.Bg.spriteFrame = this.Bgs[index - 1] : this.Bg.spriteFrame = this.Bgs[3];
  64. index <= 3 ? this.Medal.spriteFrame = this.Medals[index - 1] : this.Medal.spriteFrame = this.Medals[3];
  65. }
  66. if (index > 3) {
  67. this.Medal.node.active = false;
  68. } else {
  69. this.Medal.node.active = true;
  70. }
  71. this.Num.string = index == 101 ? "未上榜" : index <= 3 ? '' : index.toString();
  72. this.Name.string = (_crd && ch === void 0 ? (_reportPossibleCrUseOfch({
  73. error: Error()
  74. }), ch) : ch).sdk.getDefNickName(data);
  75. this.Level.string = ((_data$score = data.score) != null ? _data$score : 0) + "\u5173";
  76. console.log(data);
  77. this.Head_Icon.show(data.userId.toString(), data.head);
  78. }
  79. }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "Bg", [_dec2], {
  80. configurable: true,
  81. enumerable: true,
  82. writable: true,
  83. initializer: function initializer() {
  84. return null;
  85. }
  86. }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "Bgs", [_dec3], {
  87. configurable: true,
  88. enumerable: true,
  89. writable: true,
  90. initializer: function initializer() {
  91. return [];
  92. }
  93. }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "Medal", [_dec4], {
  94. configurable: true,
  95. enumerable: true,
  96. writable: true,
  97. initializer: function initializer() {
  98. return null;
  99. }
  100. }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Medals", [_dec5], {
  101. configurable: true,
  102. enumerable: true,
  103. writable: true,
  104. initializer: function initializer() {
  105. return [];
  106. }
  107. }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "Num", [_dec6], {
  108. configurable: true,
  109. enumerable: true,
  110. writable: true,
  111. initializer: function initializer() {
  112. return null;
  113. }
  114. }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "Head_Icon", [_dec7], {
  115. configurable: true,
  116. enumerable: true,
  117. writable: true,
  118. initializer: function initializer() {
  119. return null;
  120. }
  121. }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "Name", [_dec8], {
  122. configurable: true,
  123. enumerable: true,
  124. writable: true,
  125. initializer: function initializer() {
  126. return null;
  127. }
  128. }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "Level", [_dec9], {
  129. configurable: true,
  130. enumerable: true,
  131. writable: true,
  132. initializer: function initializer() {
  133. return null;
  134. }
  135. })), _class2)) || _class));
  136. _cclegacy._RF.pop();
  137. _crd = false;
  138. }
  139. };
  140. });
  141. //# sourceMappingURL=e1147a79464be3722bfd2a8f7d71b0aa13cfba5c.js.map