if (wx.createRewardedVideoAd) {
rewardedVideoAd = wx.createRewardedVideoAd({
adUnitId: 'adunit-572eb67057b3bb13'
})
rewardedVideoAd.onLoad(() => {
console.log('激励视频 广告加载成功')
})
rewardedVideoAd.onError((err) => {
console.log('onError event emit', err)
})
rewardedVideoAd.onClose((res) => {
console.log('onClose event emit', res)
if (res && res.isEnded) {
console.log('正常播放结束,可以下发游戏奖励')
} else {
console.log('播放中途退出,不下发游戏奖励')
}
})
}