|
@@ -82,7 +82,7 @@
|
|
<text>合计:</text>
|
|
<text>合计:</text>
|
|
<text class="amount">¥{{finalAmount}}</text>
|
|
<text class="amount">¥{{finalAmount}}</text>
|
|
<view class="">
|
|
<view class="">
|
|
- <button @click="handleSubmit" type="warn">去付款</button>
|
|
|
|
|
|
+ <button :disabled="disabledPay" @click="handleSubmit" type="warn">去付款</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -110,6 +110,7 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
status: 'loadmore',
|
|
status: 'loadmore',
|
|
|
|
+ disabledPay: false,
|
|
userPhone: '',
|
|
userPhone: '',
|
|
stepIndex: 0, // 当前步奏下标
|
|
stepIndex: 0, // 当前步奏下标
|
|
serverIndex: 0, // 选择服务下标
|
|
serverIndex: 0, // 选择服务下标
|
|
@@ -329,6 +330,7 @@
|
|
if (this.checkedCoupon) {
|
|
if (this.checkedCoupon) {
|
|
params.couponReceivesList = [{id:this.checkedCoupon.id}]
|
|
params.couponReceivesList = [{id:this.checkedCoupon.id}]
|
|
}
|
|
}
|
|
|
|
+ this.disabledPay = true
|
|
saveOrder(params).then(res => {
|
|
saveOrder(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
let data = res.data
|
|
let data = res.data
|
|
@@ -337,8 +339,9 @@
|
|
this.$u.vuex('vuex_itemCode',data.itemCode)
|
|
this.$u.vuex('vuex_itemCode',data.itemCode)
|
|
this.$u.vuex('vuex_orderNo',data.orderNo)
|
|
this.$u.vuex('vuex_orderNo',data.orderNo)
|
|
} else {
|
|
} else {
|
|
- this.toashMsg(res.message)
|
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
|
+ this.toashMsg(res.message)
|
|
|
|
+ this.disabledPay = false
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
// 刷新服务项
|
|
// 刷新服务项
|
|
this.getServerList()
|
|
this.getServerList()
|
|
@@ -374,11 +377,13 @@
|
|
fail: function(err) {
|
|
fail: function(err) {
|
|
console.log('fail:' + JSON.stringify(err));
|
|
console.log('fail:' + JSON.stringify(err));
|
|
_this.payFail(err)
|
|
_this.payFail(err)
|
|
|
|
+ _this.disabledPay = false
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.toashMsg(res.message)
|
|
this.toashMsg(res.message)
|
|
|
|
+ this.disabledPay = false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -393,6 +398,8 @@
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
url: `/pages/work/index/index`
|
|
url: `/pages/work/index/index`
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ this.disabledPay = false
|
|
},
|
|
},
|
|
// 付款失败或取消
|
|
// 付款失败或取消
|
|
payFail(err){
|
|
payFail(err){
|