| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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!;
- // onLoad() {
- // }
- start() {
- mk.audio.playEffect("receiptNotice");
- }
- update(dt) {
- if (gData.receiptNotice.init_style) {
- gData.receiptNotice.init_style = false;
- this.initStyle();
- }
- }
- /**
- * 初始化样式
- */
- 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 || '';
- }
- }
|