Commit b3ee5789 authored by mengcuiguang's avatar mengcuiguang

代码合并

parent 096f8f5d
...@@ -444,6 +444,9 @@ ...@@ -444,6 +444,9 @@
this.isqp = e.detail.show this.isqp = e.detail.show
}, },
collect(vedioId, index) { collect(vedioId, index) {
this.showAdPop = true
return
this.data.collect = 1 this.data.collect = 1
// 收藏 // 收藏
this.post({ this.post({
...@@ -487,6 +490,7 @@ ...@@ -487,6 +490,7 @@
}); });
}, },
preloadAd() { preloadAd() {
let that = this
// 创建实例 // 创建实例
this.ad = tt.createRewardedVideoAd({ this.ad = tt.createRewardedVideoAd({
adUnitId: REWARD_ID, adUnitId: REWARD_ID,
...@@ -506,9 +510,14 @@ ...@@ -506,9 +510,14 @@
default: default:
// 更多请参考错误码文档 // 更多请参考错误码文档
} }
that.$nextTick(() => {
// 延迟渲染,否则位置错乱
that.showCoinPop = true
})
}); });
let that = this
// 监听视频播放完成 // 监听视频播放完成
this.ad.onClose((data) => { this.ad.onClose((data) => {
uni.hideLoading(); uni.hideLoading();
...@@ -521,6 +530,11 @@ ...@@ -521,6 +530,11 @@
uni.showToast({ uni.showToast({
title: "未观看完整视频" title: "未观看完整视频"
}) })
that.$nextTick(() => {
// 延迟渲染,否则位置错乱
that.showCoinPop = true
})
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment