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,19 +195,20 @@ ...@@ -194,19 +195,20 @@
}, },
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'
}) })
return return
} }
this.$nextTick(() => { this.$nextTick(() => {
// 延迟渲染,否则位置错乱 // 延迟渲染,否则位置错乱
this.showCoinPop = true this.showCoinPop = true
...@@ -225,16 +227,12 @@ ...@@ -225,16 +227,12 @@
}, },
selectThisVideo(index) { selectThisVideo(index) {
this.down(); this.down();
if (this.originList[this.originIndex].lock) { this.duration = 20;
this.unlock(this.originIndex) this.originIndex = index
} else { this.initSwiperData(this.originIndex);
this.duration = 20; setTimeout(() => {
this.originIndex = index this.duration = 500;
this.initSwiperData(this.originIndex); }, 500)
setTimeout(() => {
this.duration = 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