QQ美化社区
QQ美化社区
  • 发布:2022-04-11 23:49
  • 更新:2022-04-12 10:10
  • 阅读:623

unapp添加广告

分类:uni-app
    methods: {  
        adLoad: function() {  
            if (tt.createRewardedVideoAd) {  
                videoAd = tt.createRewardedVideoAd({  
                    adUnitId: "2hw48amcx9px4j8fb1"  
                })  
                videoAd.show()  
                videoAd.onLoad((status) => {  
                    if (!this.result) {  
                        this.getResult()  
                    }  
                })  
                videoAd.onError(err => {})  
                videoAd.onClose((status) => {  
                    if (status && status.isEnded || status === undefined) {  
                        this.end = false  
                    } else {  
                        this.end = true  
                    }  
                })  
            }  
        },  
    }  
}  

<template>
<view>
<button @click=" ">观看广告解锁全部内容</button>

</view>  

</template>

各位老哥绑定事件是填上面那个代码??

2022-04-11 23:49 负责人:无 分享
已邀请:
DCloud_uniAD_HDX

DCloud_uniAD_HDX

该问题目前已经被锁定, 无法添加新回复