Commit da5fed19 authored by jyx's avatar jyx

优化样式

parent 7d089bb1
...@@ -59,8 +59,8 @@ ...@@ -59,8 +59,8 @@
<style lang="scss"> <style lang="scss">
.container { .container {
margin-top: -200rpx;
width: 600rpx; width: 600rpx;
height: 800rpx;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<text class="title">恭喜你,获得免费看剧名额</text> <text class="title">恭喜你,获得免费看剧名额</text>
<text class="button-ad" @click="handleAd">看视频免费解锁1集</text> <text class="button-ad" @click="handleAd">看视频免费解锁1集</text>
<text class="button-vip" @click="handleVip">免广告解锁</text> <text class="button-vip" @click="handleVip">免广告解锁</text>
<text class="downtext">{{countDown}}s后自动进入广告,观看完成解锁第{{vedioIndex+1}}集剧情</text> <text v-show="showTime" class="downtext">{{countDown}}s后自动进入广告,观看完成解锁第{{vedioIndex+1}}集剧情</text>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
return { return {
adUnitId: EXPRESS_ID, adUnitId: EXPRESS_ID,
countDown: 3, countDown: 3,
timer: '' timer: '',
showTime: false
}; };
}, },
methods: { methods: {
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
}, },
startCountdown() { startCountdown() {
let that = this; let that = this;
that.showTime = true
var countDownSeconds = 3 var countDownSeconds = 3
that.countDown = countDownSeconds that.countDown = countDownSeconds
this.timer = setInterval(() => { this.timer = setInterval(() => {
...@@ -65,17 +66,20 @@ ...@@ -65,17 +66,20 @@
} }
}, 1000) }, 1000)
}, },
handleAd() { handleAd() {
this.showTime = false
clearInterval(this.timer) clearInterval(this.timer)
// this.$refs.adPop.close('center'); // this.$refs.adPop.close('center');
this.$emit('handleAd'); this.$emit('handleAd');
}, },
handleVip() { handleVip() {
this.showTime = false
clearInterval(this.timer) clearInterval(this.timer)
this.$refs.adPop.close(); this.$refs.adPop.close();
this.$emit('handleVip'); this.$emit('handleVip');
}, },
onClose() { onClose() {
this.showTime = false
clearInterval(this.timer) clearInterval(this.timer)
this.$refs.adPop.close(); this.$refs.adPop.close();
this.$emit('handleClose'); this.$emit('handleClose');
...@@ -95,7 +99,7 @@ ...@@ -95,7 +99,7 @@
handler: function(newVal, oldVal) { handler: function(newVal, oldVal) {
if (newVal) { if (newVal) {
this.handleShow(); this.handleShow();
} else { } else {
try { try {
clearInterval(this.timer) clearInterval(this.timer)
this.$refs.adPop.close(); this.$refs.adPop.close();
...@@ -111,9 +115,9 @@ ...@@ -111,9 +115,9 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.container { .container {
margin-top: -200rpx;
width: 600rpx; width: 600rpx;
height: 800rpx;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -624,10 +624,10 @@ ...@@ -624,10 +624,10 @@
} else { } else {
message.notify("未观看完整视频") message.notify("未观看完整视频")
that.$nextTick(() => { // that.$nextTick(() => {
// 延迟渲染,否则位置错乱 // // 延迟渲染,否则位置错乱
that.showCoinPop = true // 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