NewNotice.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. const { ccclass, property } = cc._decorator;
  2. @ccclass
  3. export default class NewNotice extends cc.Component {
  4. @property({ displayName: '提现金额', type: cc.Label })
  5. private lbl_reward_value: cc.Label = null;
  6. @property({ displayName: '提现时间', type: cc.Label })
  7. private lbl_time: cc.Label = null;
  8. onLoad() {
  9. }
  10. start() {
  11. //mk.audio.playEffect("receiptNotice");
  12. }
  13. update(dt) {
  14. if (gData.receiptNotice.init_style) {
  15. gData.receiptNotice.init_style = false;
  16. this.initUI();
  17. }
  18. }
  19. private initUI() {
  20. console.log("newNotices=>" + gData.receiptNotice.receip_rmb);
  21. this.lbl_reward_value.string = (gData.receiptNotice.receip_rmb / 100).toFixed(2);
  22. this.lbl_time.string = mk.time.getNowDayStringExtend();
  23. }
  24. private clickCloseBtn() {
  25. mk.audio.playEffect('button');
  26. gData.cashPro.openCashPro(gData.receiptNotice.receip_rmb);
  27. gData.cashPro.init_success = true;
  28. }
  29. }