AdDataManager.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. var t = require;
  2. var e = module;
  3. var i = exports;
  4. var s =
  5. (this && this.__awaiter) ||
  6. function (t, n, r, l) {
  7. return new (r = r || Promise)(function (i, e) {
  8. function s(t) {
  9. try {
  10. a(l.next(t));
  11. } catch (t) {
  12. e(t);
  13. }
  14. }
  15. function o(t) {
  16. try {
  17. a(l.throw(t));
  18. } catch (t) {
  19. e(t);
  20. }
  21. }
  22. function a(t) {
  23. var e;
  24. t.done
  25. ? i(t.value)
  26. : ((e = t.value) instanceof r
  27. ? e
  28. : new r(function (t) {
  29. t(e);
  30. })
  31. ).then(s, o);
  32. }
  33. a((l = l.apply(t, n || [])).next());
  34. });
  35. };
  36. Object.defineProperty(i, "__esModule", {value: !0}), (i.AdData = i.AdDataManager = void 0);
  37. const o = t("CsvDataBase"),
  38. a = t("DataMsrBase"),
  39. n = t("ConfigManager"),
  40. r = t("ADController");
  41. class l extends a.default {
  42. constructor() {
  43. super(h, "ad_data", "id");
  44. }
  45. load() {
  46. const e = Object.create(null, {load: {get: () => super.load}});
  47. return s(this, void 0, void 0, function* () {
  48. yield e.load.call(this);
  49. let t = {};
  50. for (const e in this.datas) t[r.AdType[this.datas[e].enumKey]] = this.datas[e];
  51. this.datas = t;
  52. });
  53. }
  54. }
  55. i.AdDataManager = l;
  56. class h extends o.CsvDataBase {
  57. constructor() {
  58. super(...arguments),
  59. (this.id = null),
  60. (this.name = null),
  61. (this.enumKey = ""),
  62. (this.adTimes = null),
  63. (this.shareTimes = null),
  64. (this.superCashTimes = null),
  65. (this.payTimes = null),
  66. (this.type = null),
  67. (this.price = null),
  68. (this.totalTimes = null),
  69. (this.freeCnt = null),
  70. (this.isDayClear = null),
  71. (this.addSuperCash = null);
  72. }
  73. }
  74. (i.AdData = h), n.register(l, "AdDataManager");