CashRebateView.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * @Author: mojunshou 1637302775@qq.com
  3. * @Date: 2025-03-21 11:45:43
  4. * @LastEditors: mojunshou 1637302775@qq.com
  5. * @LastEditTime: 2025-04-10 15:07:56
  6. * @Description: 提现必返
  7. */
  8. import { _decorator, Label } from 'cc';
  9. import { oops } from 'db://oops-framework/core/Oops';
  10. import { DeviceUtil } from 'db://oops-framework/core/utils/DeviceUtil';
  11. import { GameComponent } from "db://oops-framework/module/common/GameComponent";
  12. import { UIID } from '../common/config/GameUIConfig';
  13. import { CocosHandler } from '../common/manager/CocosHandler';
  14. const { ccclass, property } = _decorator;
  15. /** 显示对象控制 */
  16. @ccclass('CashRebateView')
  17. export class CashRebateView extends GameComponent {
  18. private _num: number = 0;
  19. private lab_num: Label = null!;
  20. protected start() {
  21. this.lab_num = this.node.getChildByPath("Sprite/lab_num")!.uiLabel;
  22. }
  23. private btn_ok() {
  24. //看广告
  25. if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
  26. CocosHandler.inst.ad_interstitial("105");
  27. } else {
  28. oops.gui.remove(UIID.CashRebate);
  29. }
  30. }
  31. private btn_close() {
  32. //看广告
  33. if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
  34. CocosHandler.inst.ad_interstitial("105");
  35. } else {
  36. oops.gui.remove(UIID.CashRebate);
  37. }
  38. }
  39. }