| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import { GameProp } from "../../data/GameData";
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class NewNotice extends cc.Component {
- @property({ displayName: '提现金额', type: cc.Label })
- private lbl_reward_value: cc.Label = null;
- @property({ displayName: '提现时间', type: cc.Label })
- private lbl_time: cc.Label = null;
- onLoad() {
- }
- start() {
- //mk.audio.playEffect("receiptNotice");
- let times = gData.gameData.getProp(GameProp.cashTimes);
- if (!times) {
- times = 0;
- }
- gData.gameData.setProp(GameProp.cashTimes, ++times);
- if(gData.gameData.taskRedBagAutoShowLimit == times && gData.gameData.funOpenData[4] == "1"){
- mk.event.emit("showTaskRedBagAction");
- }
- //获取账单记录数据
- //gData.cashOutBillData.getUserBillInfo();
- }
- onEnable()
- {
- mk.ad.showNative();
- }
- update(dt) {
- if (gData.receiptNotice.init_style) {
- gData.receiptNotice.init_style = false;
- this.initUI();
- }
- }
- private initUI() {
- this.lbl_reward_value.string = (gData.receiptNotice.receip_rmb / 100).toFixed(2);
- this.lbl_time.string = mk.time.getNowDayStringExtend();
- }
- private clickCloseBtn() {
- mk.audio.playEffect('button');
- gData.cashPro.openCashPro(gData.receiptNotice.receip_rmb);
- gData.cashPro.init_success = true;
- mk.ad.destroyNativeAd();
- }
- }
|