Commit b98e673c authored by xiabin's avatar xiabin

添加视频观看完后提示

parent e3193e1d
......@@ -37,17 +37,18 @@
},
methods: {
pay(){
this.$dispatch('pay-click');
this.$dispatch('pay-click');
}
},
ready(){
if (this.videoInfo.isShop) {
this.showTips = false;
} else {
this.showTips = true;
}
//不显示视频则不绑定
if (this.videoInfo.freeTime > 0) {
//不显示视频则不绑定 不为没有购买且为不免费
if (this.videoInfo.freeTime > 0 || this.videoInfo.isShop == true) {
var self = this;
var rate = 9 / 16;
var w = $('.video-main').width();
......@@ -70,13 +71,26 @@
var hVideo = wVideo * rate;
$('#my-video-play').css('height', hVideo);
};
});
myPlayer.bigPlayButton.on('click', function () {
self.showTips = false;
});
})
//没购买显示
if (this.videoInfo.isShop == false) {
myPlayer.bigPlayButton.on('click', function () {
self.showTips = false;
});
myPlayer.on('ended', function () {
layer.confirm('试看已结束,购买后查看完整版课程?', {
btn: ['立即购买'] //按钮
}, function () {
self.pay();
});
});
}
}
}
}
</script>
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