Commit cc886fef authored by zhengke's avatar zhengke

增加防重复提交

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