Commit 6f528c20 authored by jyx's avatar jyx

代码优化

parent 8ea814f5
......@@ -86,7 +86,7 @@
<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;">
<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"
style="width:30rpx;height:30rpx;position:absolute;right:5rpx;top:5rpx;" />
<view class="flex"
......@@ -96,7 +96,8 @@
<text v-else
style="font-size: 36rpx;color: #FFFFFF;">{{list.vedioIndex}}</text>
</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;" />
</view>
</block>
......@@ -194,19 +195,20 @@
},
methods: {
paySuccess() {
this.getData()
this.unlock(this.originIndex)
// this.getData()
},
showPayDialog() {
let isIOS = wx.getSystemInfoSync().platform;
if (isIOS==='ios') {
uni.showToast({
title: '暂不支持IOS系统',
icon: 'none'
})
return
}
showPayDialog() {
let isIOS = wx.getSystemInfoSync().platform;
if (isIOS === 'ios') {
uni.showToast({
title: '暂不支持IOS系统',
icon: 'none'
})
return
}
this.$nextTick(() => {
// 延迟渲染,否则位置错乱
this.showCoinPop = true
......@@ -225,16 +227,12 @@
},
selectThisVideo(index) {
this.down();
if (this.originList[this.originIndex].lock) {
this.unlock(this.originIndex)
} else {
this.duration = 20;
this.originIndex = index
this.initSwiperData(this.originIndex);
setTimeout(() => {
this.duration = 500;
}, 500)
}
this.duration = 20;
this.originIndex = index
this.initSwiperData(this.originIndex);
setTimeout(() => {
this.duration = 500;
}, 500)
},
down() {
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