Commit 4c1a9fd6 authored by jyx's avatar jyx

优化vip解锁逻辑

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