|
@@ -155,16 +155,6 @@
|
|
|
<protocol :proto="protocolData" @popupClose="onPopupClose"></protocol>
|
|
|
</van-popup>
|
|
|
|
|
|
- <van-popup v-model="orderPayStatus" position='bottom'>
|
|
|
- <!-- <van-count-down :time='time' /> -->
|
|
|
- <p class="countDownContent">恭喜您抢占席位成功,请您在<span style="color: #F00"><van-count-down format="ss" @finish="finished" :time='time' />秒</span>内完成支付!</p>
|
|
|
- <iframe class="iframe" id="iframe" src="./orderpay.html" width="100%" height="100%" frameborder="0" scrolling='auto' seamless></iframe>
|
|
|
- </van-popup>
|
|
|
-
|
|
|
- <!-- <van-overlay :show="true" @click="show = false" >
|
|
|
- <van-loading size="24px" vertical>加载中...</van-loading>
|
|
|
- </van-overlay> -->
|
|
|
-
|
|
|
<van-popup v-model="loadingOrderStatus" :close-on-click-overlay='false' class="loadingOrder">
|
|
|
<van-loading size="36px" vertical color="#14928A">{{ loadingOrderText }}</van-loading>
|
|
|
</van-popup>
|
|
@@ -183,14 +173,12 @@ export default {
|
|
|
components: { Protocol, Dialog, CountDown, OrderPay },
|
|
|
data() {
|
|
|
return {
|
|
|
- time: 120 * 1000, // 倒计时时间
|
|
|
loadingOrderStatus: false, // 排队中状态
|
|
|
loadingOrderText: '加载中...', // 排队文案
|
|
|
resultParams: '', // 提交订单参数
|
|
|
clickBtnCount: true, // 点击按钮次数判定
|
|
|
paymentTimers: null, // 定时器
|
|
|
paymentPostCount: 0, // 请求计数
|
|
|
- orderPayStatus: false, // 支付弹窗
|
|
|
popupStatus: false, // 协议弹窗样式
|
|
|
protocolData: {}, // 协议参数
|
|
|
result: {}, // 返回结果
|
|
@@ -385,10 +373,6 @@ export default {
|
|
|
axios.post('/yqpay/toPay', qs.stringify(resultParams)).then((res) => {
|
|
|
let result = res.data
|
|
|
this.clickBtnCount = true
|
|
|
- // if(!window.history && history.pushState) {
|
|
|
- // history.pushState(null, null, 'https://www.baidu.com/')
|
|
|
- // }
|
|
|
-
|
|
|
if(result.code == 403) {
|
|
|
this.loadingOrderStatus = true
|
|
|
this.loadingOrderText = result.msg
|
|
@@ -396,8 +380,7 @@ export default {
|
|
|
} else {
|
|
|
if(result.data) {
|
|
|
this.form = result.data
|
|
|
- this.orderPayStatus = true
|
|
|
- sessionStorage.setItem('orderForm', JSON.stringify(result.data))
|
|
|
+ this.onSubmit()
|
|
|
} else {
|
|
|
Dialog.alert({
|
|
|
title: '提示',
|
|
@@ -414,7 +397,6 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
let that = this
|
|
|
- // let paymentTimers, paymentPostCount = 0
|
|
|
that.paymentTimers = setInterval(() => {
|
|
|
that.paymentPostCount++
|
|
|
if(that.paymentPostCount >= 30) {
|
|
@@ -431,8 +413,7 @@ export default {
|
|
|
that.loadingOrderText = '加载中...'
|
|
|
if(result.data) {
|
|
|
that.form = result.data
|
|
|
- that.orderPayStatus = true
|
|
|
- sessionStorage.setItem('orderForm', JSON.stringify(result.data))
|
|
|
+ this.onSubmit()
|
|
|
} else {
|
|
|
Dialog.alert({
|
|
|
title: '提示',
|
|
@@ -446,10 +427,6 @@ export default {
|
|
|
}, 1000 * 10)
|
|
|
|
|
|
},
|
|
|
- finished() {
|
|
|
- // 倒计时结束调用
|
|
|
- this.orderPayStatus = false
|
|
|
- },
|
|
|
onSubmit() {
|
|
|
// submit 提交
|
|
|
let f = this.form
|