Commit cc886fef authored by zhengke's avatar zhengke

增加防重复提交

parent ad3655f9
...@@ -239,6 +239,9 @@ ...@@ -239,6 +239,9 @@
line-height: 40rpx; line-height: 40rpx;
margin-right: 24rpx; margin-right: 24rpx;
} }
.jz_ReserveDisBtn{
background-color: gray;
}
</style> </style>
<template> <template>
<view class="jz_Reserve"> <view class="jz_Reserve">
...@@ -379,7 +382,7 @@ ...@@ -379,7 +382,7 @@
<text style="color:#6E6E6E;font-size:24rpx;">共计{{total}}</text> <text style="color:#6E6E6E;font-size:24rpx;">共计{{total}}</text>
</view> </view>
<view style="display:flex;margin-top:-2px;"> <view style="display:flex;margin-top:-2px;">
<view class="jz_OrderReNow" @click="goPay()">立即支付</view> <view class="jz_OrderReNow" :class="{'jz_ReserveDisBtn':!isSubmit}" @click="goPay()">立即支付</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -412,7 +415,9 @@ ...@@ -412,7 +415,9 @@
ltName:'', ltName:'',
tips:"", tips:"",
contactMobile:"", contactMobile:"",
contactName:"" contactName:"",
//防止重复提交
isSubmit: true,
}; };
}, },
created() { created() {
...@@ -571,8 +576,15 @@ ...@@ -571,8 +576,15 @@
OrderSource: 2, OrderSource: 2,
MiniAppUserId:this.userInfo.UserId MiniAppUserId:this.userInfo.UserId
} }
if(this.isSubmit){
this.isSubmit=false;
uni.showLoading({
title: '下单中...'
})
this.apipost("sellorder_post_SetOrderInfoForB2B", msg, this.apipost("sellorder_post_SetOrderInfoForB2B", msg,
res => { res => {
uni.hideLoading();
this.isSubmit=true;
if (res.resultCode == 1) { if (res.resultCode == 1) {
let data = res.data; let data = res.data;
data.CoverImg = this.currentPriceInfo.CoverImg; data.CoverImg = this.currentPriceInfo.CoverImg;
...@@ -584,11 +596,15 @@ ...@@ -584,11 +596,15 @@
} }
}, },
null err =>{
uni.hideLoading();
this.isSubmit=true;
}
); );
} }
} }
} }
}
}; };
</script> </script>
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