WalletCashOutData.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /**
  2. * @description 提现数据
  3. */
  4. import { Data } from "../../../mk/data/Data";
  5. export class WalletCashOutData extends Data {
  6. public init_novice = false;
  7. public init_cashOut = false;
  8. public async HttpCashOut(value: number) {
  9. let data = {};
  10. let response = await mk.http.sendData('noviceWeFare/noviceWeFareCash', data);
  11. mk.console.logSingle('wallet1=>', response);
  12. if (response.errcode != 0) {
  13. return null;
  14. }
  15. this.init_novice = true;
  16. gData.gameData.gameData.userNoviceWeFareInfo = response.data.userNoviceWeFareInfo;
  17. gData.receiptNotice.receip_rmb = value;
  18. mk.ui.openPanel('module/newNotice/newNotice');
  19. }
  20. async addProgress() {
  21. let data = {};
  22. let response = await mk.http.sendData('noviceWeFare/updateNoviceWeFareInfo', data);
  23. if (response.errcode != 0) {
  24. return;
  25. }
  26. gData.gameData.gameData.userNoviceWeFareInfo = response.data.userNoviceWeFareInfo;
  27. this.init_novice = true;
  28. }
  29. async HttpCashOut2(id: number)
  30. {
  31. let data = {index: id};
  32. let response = await mk.http.sendData('redMoney/cashPay', data);
  33. mk.console.logSingle('wallet2=>', response);
  34. if (response.errcode != 0) {
  35. if(response.data.count > 0)
  36. {
  37. gData.lineUpUIData.personCount = response.count;
  38. mk.ui.openPanel("module/newNotice/LineUpUI");
  39. }
  40. return;
  41. }
  42. gData.gameData.gameData.redMoneyCashPayRecordList = response.data.redMoneyCashPayRecordList;
  43. this.init_cashOut = true;
  44. }
  45. }