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,21 +576,32 @@ ...@@ -571,21 +576,32 @@
OrderSource: 2, OrderSource: 2,
MiniAppUserId:this.userInfo.UserId MiniAppUserId:this.userInfo.UserId
} }
this.apipost("sellorder_post_SetOrderInfoForB2B", msg, if(this.isSubmit){
res => { this.isSubmit=false;
if (res.resultCode == 1) { uni.showLoading({
let data = res.data; title: '下单中...'
data.CoverImg = this.currentPriceInfo.CoverImg; })
let myData = JSON.stringify(data); this.apipost("sellorder_post_SetOrderInfoForB2B", msg,
uni.navigateTo({ res => {
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(myData) uni.hideLoading();
}); this.isSubmit=true;
} else { if (res.resultCode == 1) {
let data = res.data;
data.CoverImg = this.currentPriceInfo.CoverImg;
let myData = JSON.stringify(data);
uni.navigateTo({
url: "/pages/jiuzhai/jz_SureOrder?orderData="+encodeURIComponent(myData)
});
} else {
}
},
err =>{
uni.hideLoading();
this.isSubmit=true;
} }
}, );
null }
);
} }
} }
} }
......
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