Commit 1c213f02 authored by mengcuiguang's avatar mengcuiguang

代码优化

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