AuthUI.ts 934 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * 微信授权界面
  3. * @author kaka
  4. */
  5. import JsbSystem from "../../../mk/system/JsbSystem";
  6. const { ccclass, property} = cc._decorator;
  7. @ccclass
  8. export default class AuthUI extends cc.Component {
  9. @property({ type: cc.Label, displayName: '描述' })
  10. lbl_des: cc.Label = null;
  11. start(){
  12. if(gData.gameData.authUIType == 0)
  13. {
  14. this.lbl_des.string = '红包将提现至微信,登陆后立即到账';
  15. }else if(gData.gameData.authUIType == 1){
  16. this.lbl_des.string = '登陆后即可邀请微信好友一起玩';
  17. }else{
  18. this.lbl_des.string = '登陆后即可提现红包至微信';
  19. }
  20. }
  21. clickAuth() {
  22. mk.audio.playEffect('button');
  23. JsbSystem.WxAuth();
  24. }
  25. onEnable() {
  26. mk.ad.showNative();
  27. }
  28. onDisable() {
  29. mk.ad.destroyNativeAd();
  30. }
  31. }