PigBankData.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { Data } from "../../../mk/data/Data";
  2. /**
  3. * 存钱罐数据
  4. * - 提现描述显示:
  5. * 1.判断是否可提,
  6. * 可提显示“直接提现”
  7. * 不可提判断存款是否满足提现最低限制
  8. * 满足显示:“明日提现”,
  9. * 不满足显示:“满x可提”
  10. * @author 薛鸿潇
  11. */
  12. export class PigBankData extends Data {
  13. /** 标志位:是否需要刷新数据 */
  14. public init_data: boolean = true;
  15. /** 是否可提现 */
  16. private _cash_enable: boolean = true;
  17. set cash_enable(bool: boolean) {
  18. if (this._cash_enable != bool) {
  19. this._cash_enable = bool;
  20. this.init_data = true;
  21. }
  22. }
  23. get cash_enable(): boolean {
  24. return this._cash_enable;
  25. }
  26. /** 当前存款 */
  27. private _cur_cash_count: number = 0.36;
  28. set cur_cash_count(value: number) {
  29. if (this._cur_cash_count != value) {
  30. this._cur_cash_count = value;
  31. this.init_data = true;
  32. }
  33. }
  34. get cur_cash_count(): number {
  35. return this._cur_cash_count;
  36. }
  37. /** 提现最低限制 */
  38. public cash_min_limit: number = 0.3;
  39. /**
  40. * 提现操作
  41. * - 此处需要对接服务端数据
  42. */
  43. public cashOP() {
  44. this.cash_enable = false;
  45. }
  46. }