Commit 03df497e authored by mengcuiguang's avatar mengcuiguang

广告弹窗添加开关

parent b86bf4b5
......@@ -10,7 +10,7 @@
<view class="content">
<text class="title">恭喜你,获得免费看剧名额</text>
<text class="button" @click="handleClose">看视频免费解锁1集</text>
<text class="downtext">{{countDown+'s后自动进入广告页面解锁后续'}}</text>
<text class="downtext">{{countDown}}s后自动进入广告,观看完成解锁第{{vedioIndex+1}}集剧情</text>
</view>
</view>
</uni-popup>
......@@ -29,6 +29,10 @@
type: Boolean,
default: false,
},
vedioIndex: {
type: [Number, String],
default: 0
}
},
data() {
return {
......
......@@ -68,7 +68,7 @@
:originIndex="originIndex" />
<coin-popup :show="showCoinPop" :point="data.point" :vedioId="data.vedioId" @close="showCoinPop = false"
@clickClose="coinPopupClose" @paySuccess="paySuccess" />
<ad-popup :show="showAdPop" @close="adPopupClose" />
<ad-popup :show="showAdPop" @close="adPopupClose" :vedioIndex="originIndex" />
</view>
</template>
......@@ -129,6 +129,7 @@
showTap: false,
showCoinPop: false,
showAdPop: false,
showAdForServer: false,
vipBackPage: '',
canUseTTPlayer: true,
};
......@@ -168,6 +169,16 @@
});
}
this.post({
url: '/vedio/confs',
showLoading: false,
success: ({
data
}) => {
this.showAdForServer = data.douyinAdTipOpen;
}
});
},
// 分享
// onShareAppMessage() {
......@@ -444,9 +455,6 @@
this.isqp = e.detail.show
},
collect(vedioId, index) {
this.showAdPop = true
return
this.data.collect = 1
// 收藏
this.post({
......@@ -546,7 +554,11 @@
this.ad.load();
},
coinPopupClose() {
if (this.showAdForServer) {
this.showAdPop = true
} else {
this.showCoinPop = false
}
},
adPopupClose() {
this.showAdPop = false
......
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