Commit 6f528c20 authored by jyx's avatar jyx

代码优化

parent 8ea814f5
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<view @click.stop="selectThisVideo(index2 + (index1%30*30))" <view @click.stop="selectThisVideo(index2 + (index1%30*30))"
style="position: relative;width:16%;height: 120rpx; background: gray;border-radius: 10rpx;margin-left: 5rpx;margin-bottom: 5rpx;"> style="position: relative;width:16%;height: 120rpx; background: gray;border-radius: 10rpx;margin-left: 5rpx;margin-bottom: 5rpx;">
<image v-if="originList[ <image v-if="originList[
(index1 == 0 ? index2 : (index2+1 + (index1%30*30))) (index1 == 0 ? index2 : (index2 + (index1%30*30)))
].lock" src="@/static/video/lock.png" ].lock" src="@/static/video/lock.png"
style="width:30rpx;height:30rpx;position:absolute;right:5rpx;top:5rpx;" /> style="width:30rpx;height:30rpx;position:absolute;right:5rpx;top:5rpx;" />
<view class="flex" <view class="flex"
...@@ -96,7 +96,8 @@ ...@@ -96,7 +96,8 @@
<text v-else <text v-else
style="font-size: 36rpx;color: #FFFFFF;">{{list.vedioIndex}}</text> style="font-size: 36rpx;color: #FFFFFF;">{{list.vedioIndex}}</text>
</view> </view>
<image v-if="(originIndex+1)==list.vedioIndex" src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_playing.gif" <image v-if="(originIndex+1)==list.vedioIndex"
src="https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_playing.gif"
style="width:30rpx;height:30rpx;position:absolute;left:5rpx;bottom:5rpx;" /> style="width:30rpx;height:30rpx;position:absolute;left:5rpx;bottom:5rpx;" />
</view> </view>
</block> </block>
...@@ -194,11 +195,12 @@ ...@@ -194,11 +195,12 @@
}, },
methods: { methods: {
paySuccess() { paySuccess() {
this.getData() this.unlock(this.originIndex)
// this.getData()
}, },
showPayDialog() { showPayDialog() {
let isIOS = wx.getSystemInfoSync().platform; let isIOS = wx.getSystemInfoSync().platform;
if (isIOS==='ios') { if (isIOS === 'ios') {
uni.showToast({ uni.showToast({
title: '暂不支持IOS系统', title: '暂不支持IOS系统',
icon: 'none' icon: 'none'
...@@ -225,16 +227,12 @@ ...@@ -225,16 +227,12 @@
}, },
selectThisVideo(index) { selectThisVideo(index) {
this.down(); this.down();
if (this.originList[this.originIndex].lock) {
this.unlock(this.originIndex)
} else {
this.duration = 20; this.duration = 20;
this.originIndex = index this.originIndex = index
this.initSwiperData(this.originIndex); this.initSwiperData(this.originIndex);
setTimeout(() => { setTimeout(() => {
this.duration = 500; this.duration = 500;
}, 500) }, 500)
}
}, },
down() { down() {
this.$refs.select2.close(); this.$refs.select2.close();
......
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