| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- /**
- * @description 提现数据
- */
- import { Data } from "../../../mk/data/Data";
- export class WalletCashOutData extends Data {
- public init_novice = false;
- public init_cashOut = false;
- public async HttpCashOut(value: number) {
- let data = {};
- let response = await mk.http.sendData('noviceWeFare/noviceWeFareCash', data);
- mk.console.logSingle('wallet1=>', response);
- if (response.errcode != 0) {
- return null;
- }
- this.init_novice = true;
- gData.gameData.gameData.userNoviceWeFareInfo = response.data.userNoviceWeFareInfo;
- gData.receiptNotice.receip_rmb = value;
- mk.ui.openPanel('module/newNotice/newNotice');
- }
- async addProgress() {
- let data = {};
- let response = await mk.http.sendData('noviceWeFare/updateNoviceWeFareInfo', data);
- if (response.errcode != 0) {
- return;
- }
- gData.gameData.gameData.userNoviceWeFareInfo = response.data.userNoviceWeFareInfo;
- mk.tip.pop('现金进度已增加');
- this.init_novice = true;
- }
- async HttpCashOut2(id: number)
- {
- let data = {index: id};
- let response = await mk.http.sendData('redMoney/cashPay', data);
- mk.console.logSingle('wallet2=>', response);
- if (response.errcode != 0) {
- if(response.data.count > 0)
- {
- gData.lineUpUIData.personCount = response.data.count;
- gData.lineUpUIData.cashId = id;
- gData.lineUpUIData.refresh = true;
- mk.ui.openPanel("module/newNotice/lineUpUI");
- }
- return;
- }
- gData.gameData.gameData.redMoneyCashPayRecordList = response.data.redMoneyCashPayRecordList;
- this.init_cashOut = true;
- let cashData = gData.gameData.configs.CashCfg;
- if(cashData)
- {
- gData.gameData.gameData.redMoney -= cashData[id-1].redMoney;
- gData.receiptNotice.receip_rmb = cashData[id-1].money;
- mk.ui.openPanel('module/newNotice/newNotice');
- }
- }
- }
|