RedPointData.ts 981 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { Data } from "../core/data/Data";
  2. import { Http } from "../core/net/Http";
  3. /**
  4. * 红点数据
  5. */
  6. export class RedPointData extends Data {
  7. /**
  8. * 可领取图鉴武将奖励的列表
  9. */
  10. public herosReward: number[] = [];
  11. /**
  12. * 是否可抽奖
  13. */
  14. public canDraw: boolean = false;
  15. /**
  16. * 是否可领取贡献
  17. */
  18. public checkFission: boolean = false;
  19. /**
  20. *是否可领取切磋宝箱
  21. */
  22. public canReceiveFightBox: boolean = false;
  23. /**
  24. * 征粮数据
  25. */
  26. public grainLevies: {
  27. times: number;
  28. leviesDatas: {
  29. index: number;
  30. finishTime: number;
  31. isReceive: boolean;
  32. }[];
  33. }
  34. /**
  35. * 从服务端拉取数据
  36. * @param http
  37. */
  38. public async pull(http: Http) {
  39. let result = await http.send("/api/user/redpoint");
  40. if (result && result.data) {
  41. this.copy(result.data);
  42. }
  43. }
  44. }