| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- /**
- * @description 提现数据
- */
- import { Data } from "../../../mk/data/Data";
- import { AdFun } from "../AdData";
- import { DataEventId } from "../GameData";
- export class WalletCashOutData extends Data {
- public init_novice = false;
- public init_cashOut = false;
- public curID = 0;
- public async HttpCashOut(value: number) {
- // gData.cashPro.openCashPro(value);
- let data = {};
- let response = await mk.http.sendData('noviceWeFare/noviceWeFareCash', data);
- mk.console.logSingle('wallet1=>', response);
- if (response.errcode != 0) {
- // gData.cashPro.init_fail = true;
- if(response.errcode == 405)
- {
- mk.tip.pop("今日提现额度已到上限,请明天再提现");
- mk.data.sendDataEvent(DataEventId.cashLimit, "提现触发上限");
- }
- return null;
- }
- this.init_novice = true;
- gData.gameData.playerProp.userNoviceWeFareInfo = response.data.userNoviceWeFareInfo;
- // gData.cashPro.init_success = true;
-
- gData.receiptNotice.receip_rmb = value;
- mk.ui.openPanel('module/newNotice/newNotice');
- gData.safeDepositBoxData.updateQipao();
- gData.gameData.doPointToXYLogic();
- //gData.gameData.addCashOutTimes();
- }
- async addProgress() {
- let data = {};
- let response = await mk.http.sendData('noviceWeFare/updateNoviceWeFareInfo', data);
- if (response.errcode != 0) {
- return;
- }
- gData.gameData.playerProp.userNoviceWeFareInfo = response.data.userNoviceWeFareInfo;
- mk.tip.pop('现金进度已增加');
- this.init_novice = true;
- }
- async HttpCashOut2(id: number) {
- // gData.cashPro.openCashPro(0);
- this.curID = id;
- let data = { index: id };
- let response = await mk.http.sendData('redMoney/cashPay', data);
- mk.console.logSingle('wallet2=>', response);
- if (response.errcode != 0) {
- if(response.errcode == 405)
- {
- mk.tip.pop("今日提现额度已到上限,请明天再提现");
- mk.data.sendDataEvent(DataEventId.cashLimit, "提现触发上限");
- return;
- }
- if (response.data.count > 0) {
- // gData.cashPro.init_fail = true;
- gData.lineUpUIData.personCount = response.data.count;
- gData.lineUpUIData.cashId = id;
- gData.lineUpUIData.refresh = true;
- gData.lineUpUIData.popType = 0;
- mk.ui.openPanel("module/newNotice/lineUpUI");
- mk.data.sendDataEvent(DataEventId.queue, '触发插队人数');
- }
- return;
- }else{
- mk.ui.closePanel("lineUpUI");
- }
- gData.gameData.playerProp.redMoneyCashPayRecordList = response.data.redMoneyCashPayRecordList;
- this.init_cashOut = true;
- let cashData = gData.gameData.configs.CashCfg;
- if (cashData) {
- gData.gameData.playerProp.redMoney -= cashData[id - 1].redMoney;
- // gData.cashPro.cashPro_money = cashData[id - 1].money;
- // gData.cashPro.init_success = true;
-
- gData.receiptNotice.receip_rmb = cashData[id - 1].money;
- mk.ui.openPanel('module/newNotice/newNotice');
- }
- gData.safeDepositBoxData.updateQipao();
- mk.data.sendDataEvent(DataEventId.Sundry, '红包币提现成功');
- gData.gameData.doPointToXYLogic();
- //gData.gameData.addCashOutTimes();
- }
- }
|