const { ccclass, property } = cc._decorator; /** * 到账通知样式 * @author 薛鸿潇 */ @ccclass export default class ReceiptNotice extends cc.Component { @property({ displayName: 'lbl收款金额', type: cc.Label }) private lbl_receipt_rmb: cc.Label = null; @property({ displayName: 'lbl累计提现', type: cc.Label }) private lbl_rmb_total: cc.Label = null; @property({ displayName: 'lbl用户名', type: cc.Label }) private lbl_user_name: cc.Label = null; start() { mk.audio.playEffect("receiptNotice"); } update(dt) { if (gData.receiptNotice.init_style) { gData.receiptNotice.init_style = false; this.initStyle(); gData.adData.checkShowFullInter(1); } } /** * 初始化样式 */ private initStyle() { this.lbl_receipt_rmb.string = '¥' + (gData.receiptNotice.receip_rmb / 100).toFixed(2) + '元'; this.lbl_rmb_total.string = '¥' + (gData.cashNormal.receip_total_rmb / 100).toFixed(2) + '元'; this.lbl_user_name.string = gData.wechatData.nickName || ''; //累计成功提现次数 mk.data.setTAEventUser(1, 'cash_time', 1); //累计提现金额 mk.data.setTAEventUser(1, 'cash_total', gData.receiptNotice.receip_rmb / 100); } }