| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- /**
- * @description 提现数据类
- * @author kaka
- */
- import { Data } from "../../../mk/data/Data";
- import { DataEventId } from "../GameData";
- export default class CashProData extends Data {
- init_data = false;
- cashPro_type: cashProType;
- cashPro_money = 0;
- init_success = false;
- init_fail = false;
- openCashPro(type: cashProType, money) {
- this.cashPro_type = type;
- this.cashPro_money = money;
- this.init_data = true;
- mk.ui.openPanel('module/cashPro/cashPro');
- }
- async onCash() {
- let response = null;
- switch (this.cashPro_type) {
- case cashProType.blessing_bigCash:
- response = await gData.blessingBag.HttpCashBig();
- if (response && response.data.code == 1) {
- gData.cashPro.init_success = true;
- mk.data.sendDataEvent(DataEventId.fudaiFunction, `视频红包大额提现第${gData.blessingBag.taskRbId}档领取成功`)
- }
-
- break;
- case cashProType.blessing_taskCash:
- response = await gData.blessingBag.HttpCashTask();
- if (response && response.data.code == 1) {
- gData.cashPro.init_success = true;
- mk.data.sendDataEvent(DataEventId.fudaiFunction, `视频红包第${gData.blessingBag.taskRbId}档领取成功`)
- }
-
- break;
- }
- gData.cashNormal.getRecord();// 请求新的提现记录
- }
- }
- /** 提现类型枚举 */
- export enum cashProType {
- blessing_bigCash, //福袋大额红包提现
- blessing_taskCash, //福袋任务提现
- }
|