| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import { Data } from "../../../mk/data/Data";
- import { GameProp } from "../GameData";
- /**
- * 红包提现数据
- * - 跨Index不可提现,提示:请按顺序提现。
- * @author 薛鸿潇
- */
- export class RedBagCashData extends Data {
- /**
- * 数据初始化
- */
- public init() {
- // 签到配置表
- this.initCData();
- if (gData.gameData.configs.cashcfg) {
- gData.gameData.configs.cashcfg.forEach(item_data => {
- for (const key in item_data) {
- item_data[key] = parseInt(item_data[key])
- }
- });
- this.c_data = gData.gameData.configs.cashcfg;
- this.init_list = true;
- }
- this.cash_bar = gData.gameData.getProp(GameProp.redBag_cash_bar);
- }
- /** 标志位:初始化列表 */
- public init_list: boolean = false;
- /** 配置表数据 */
- public c_data: Array<CDataType> = [];
- /** 标志位:初始化指定列表 */
- /** 提现进度 */
- cash_bar: number = 0;
- /**
- * 提现操作
- */
- public cashOP() {
- this.cash_bar++;
- gData.gameData.setProp(GameProp.redBag_cash_bar, this.cash_bar);
- }
- /** 客户端造的假数据 */
- private initCData() {
- for (let i = 0; i < 20; i++) {
- const id = i + 1;
- let obj = {
- index: id,
- /** 毛币数量? */
- money: id,
- /** 红包数量 */
- type_value: id * 10000,
- time: id,
- directVideoTime: id,
- delayVideoTimes: id,
- money_type: id,
- num: id,
- moneyshow: id,
- summoney: id
- };
- this.c_data.push(obj)
- }
- this.init_list = true;
- }
- }
- /** 配置表数据内容 */
- export type CDataType = {
- /** id */
- index: number,
- /** 毛币数量,单位分 */
- money: number,
- /** 红包币数量 */
- type_value: number,
- time: number,
- directVideoTime: number,
- delayVideoTimes: number,
- money_type: number,
- num: number,
- moneyshow: number,
- summoney: number
- }
|