Commit 1c213f02 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 61e244eb
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</view> </view>
<view style="display: flex;flex-direction: column;align-items: center;margin-bottom: 20rpx;"> <view style="display: flex;flex-direction: column;align-items: center;margin-bottom: 20rpx;">
<view style="font-size: 38rpx;color: black;">{{title}}</view> <view style="font-size: 38rpx;color: black;">{{title}}</view>
<view class="flex"> <view v-if="!isFirstPayFlag" class="flex">
<view v-if="point>0" style="display: flex;flex-direction: row;margin-top: 10rpx;"> <view v-if="point>0" style="display: flex;flex-direction: row;margin-top: 10rpx;">
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">解锁本集:</view> <view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">解锁本集:</view>
<view style="font-size: 42rpx;color: red;font-weight: 777;">{{point}}</view> <view style="font-size: 42rpx;color: red;font-weight: 777;">{{point}}</view>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
</view> </view>
</view> </view>
<view v-if="isTimeoutPayFlag" style="width: 100%;height: 700rpx;background-color: white;"></view>
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;"> <view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;">
...@@ -95,11 +96,13 @@ ...@@ -95,11 +96,13 @@
data() { data() {
return { return {
vipList: [], vipList: [],
screenH: 700,
selectedIndex: 0, selectedIndex: 0,
title: '超多精彩好剧一键解锁', title: '超多精彩好剧一键解锁',
userBean: {}, userBean: {},
showClone: false, showClone: false,
isFirstPayFlag: false isFirstPayFlag: false,
isTimeoutPayFlag: false
}; };
}, },
methods: { methods: {
...@@ -109,6 +112,8 @@ ...@@ -109,6 +112,8 @@
this.handleClose(); this.handleClose();
}, },
handleShow() { handleShow() {
this.screenH = uni.getSystemInfoSync().screenHeight;
let that = this; let that = this;
this.$refs.coinPop.open('bottom'); this.$refs.coinPop.open('bottom');
...@@ -154,7 +159,8 @@ ...@@ -154,7 +159,8 @@
}, },
handleClose() { handleClose() {
this.$refs.coinPop.close('bottom'); this.$refs.coinPop.close('bottom');
this.$emit('close'); this.$emit('close');
this.isTimeoutPayFlag=false;
}, },
choosePack(item, index) { choosePack(item, index) {
this.selectedIndex = index; this.selectedIndex = index;
...@@ -187,6 +193,12 @@ ...@@ -187,6 +193,12 @@
let that = this; let that = this;
const SDKVersion = wx.getSystemInfoSync().SDKVersion; const SDKVersion = wx.getSystemInfoSync().SDKVersion;
if (this.compareVersion(SDKVersion, '2.19.2') >= 0 || wx.canIUse('requestVirtualPayment')) { if (this.compareVersion(SDKVersion, '2.19.2') >= 0 || wx.canIUse('requestVirtualPayment')) {
if (that.isFirstPayFlag) {
setTimeout(() => {
that.isTimeoutPayFlag = true;
}, 1800);
}
wx.requestVirtualPayment({ wx.requestVirtualPayment({
signData: JSON.stringify(wxData.params.sigData), signData: JSON.stringify(wxData.params.sigData),
paySig: wxParams.paySig, paySig: wxParams.paySig,
......
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