CashRebateView.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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-11 11:25:36
  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. import { ADHandler } from '../common/manager/ADHandler';
  15. const { ccclass, property } = _decorator;
  16. /** 显示对象控制 */
  17. @ccclass('CashRebateView')
  18. export class CashRebateView extends GameComponent {
  19. private _num: number = 0;
  20. private lab_num: Label = null!;
  21. protected start() {
  22. this.lab_num = this.node.getChildByPath("Sprite/lab_num")!.uiLabel;
  23. }
  24. private btn_ok() {
  25. //看广告
  26. if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
  27. ADHandler.inst.showAd("105");
  28. } else {
  29. oops.gui.remove(UIID.CashRebate);
  30. }
  31. }
  32. private btn_close() {
  33. //看广告
  34. if (DeviceUtil.isNative && DeviceUtil.isAndroid) {
  35. ADHandler.inst.showAd("105");
  36. } else {
  37. oops.gui.remove(UIID.CashRebate);
  38. }
  39. }
  40. }