Commit 4c1a9fd6 authored by jyx's avatar jyx

优化vip解锁逻辑

parent 58f42a10
......@@ -18,7 +18,7 @@
<image @click.stop="cancelCollect(data.vedioId,index)" v-if="data.collect==1"
src="@/static/home_collect_img_1.png" />
<text
style="margin: 0 auto;margin-top: 110rpx;color: #FFFFFF;font-size: 26rpx;font-weight: bold;"
style="margin: 0 auto;margin-top: 120rpx;color: #FFFFFF;font-size: 26rpx;font-weight: bold;"
:class="{'likeNumActive':data.collect!=0}">{{data.hot}}</text>
</view>
<!-- 分享 -->
......@@ -163,7 +163,8 @@
tabs: [],
subList: [],
showTap: false,
showCoinPop: false
showCoinPop: false,
vipBackPage: ''
};
},
onLoad(options) {
......@@ -194,8 +195,17 @@
this.down()
},
methods: {
paySuccess() {
this.unlock(this.originIndex)
paySuccess(largeType) {
// largeType=vip 开通vip
// largeType=point 购买看点
console.log('AAAAAAA' + largeType)
if (largeType == 'vip') {
this.vipBackPage = this.originIndex
this.getData()
} else {
this.unlock(this.originIndex)
}
},
showPayDialog() {
let isIOS = wx.getSystemInfoSync().platform;
......@@ -218,11 +228,11 @@
},
timeupdate(event) {
// 自动播放下一集
if (event.detail.currentTime > 0 && this.originList[this.originIndex].lock) {
uni.createVideoContext('' + this.originList[this.originIndex].vedioIndex, this).seek(0);
uni.createVideoContext('' + this.originList[this.originIndex].vedioIndex, this).pause();
this.unlock(this.originIndex)
}
// if (event.detail.currentTime > 0 && this.originList[this.originIndex].lock) {
// uni.createVideoContext('' + this.originList[this.originIndex].vedioIndex, this).seek(0);
// uni.createVideoContext('' + this.originList[this.originIndex].vedioIndex, this).pause();
// this.unlock(this.originIndex)
// }
},
selectThisVideo(index) {
this.down();
......@@ -321,13 +331,18 @@
data
}) => {
that.originList = data.list
if (that.isPlayNext == 1) {
that.originIndex = that.data.recommendIndex - 1
if (that.vipBackPage != '') {
that.originIndex = that.vipBackPage
that.vipBackPage = ''
} else {
that.originIndex = that.data.seeIndex - 1
}
if (that.originIndex >= that.data.vedioTotal || that.originIndex < 0) {
that.originIndex = 0
if (that.isPlayNext == 1) {
that.originIndex = that.data.recommendIndex - 1
} else {
that.originIndex = that.data.seeIndex - 1
}
if (that.originIndex >= that.data.vedioTotal || that.originIndex < 0) {
that.originIndex = 0
}
}
that.data = data.vedioMsg
that.initSwiperData(that.originIndex);
......@@ -378,7 +393,6 @@
this.unlock(this.originIndex)
} else {
setTimeout(() => {
// audo.play()
uni.createVideoContext('' + this.originList[originIndex].vedioIndex, this).play();
this.commitVideo()
}, 500)
......@@ -530,8 +544,8 @@
flex-direction: column;
image {
width: 70rpx;
height: 70rpx;
width: 76rpx;
height: 76rpx;
position: absolute;
right: 10rpx;
}
......
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