|
|
@@ -93,6 +93,7 @@ export default {
|
|
|
],
|
|
|
// 订单备注
|
|
|
remarks: '',
|
|
|
+ isLoading:false
|
|
|
};
|
|
|
},
|
|
|
onLoad(opt){
|
|
|
@@ -161,6 +162,12 @@ export default {
|
|
|
items: items
|
|
|
};
|
|
|
uni.showLoading({ title: '正在提交...' });
|
|
|
+ let self = this;
|
|
|
+ if(self.isLoading){
|
|
|
+ uni.showToast({ title: '请勿重复提交', icon: 'none' });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ self.isLoading = true;
|
|
|
if(this.id>0){
|
|
|
finalData.orderId = this.id;
|
|
|
editDealerOrder(finalData).then(res=>{
|
|
|
@@ -169,7 +176,10 @@ export default {
|
|
|
}
|
|
|
uni.hideLoading();
|
|
|
|
|
|
- setTimeout(() => uni.reLaunch({url:"/pages/hexiao/jxs/order"}), 1500);
|
|
|
+ setTimeout(() =>{
|
|
|
+ self.isLoading = false;
|
|
|
+ uni.reLaunch({url:"/pages/hexiao/jxs/order"});
|
|
|
+ }, 1500);
|
|
|
})
|
|
|
}else{
|
|
|
addDealerOrder(finalData).then(res=>{
|
|
|
@@ -178,7 +188,10 @@ export default {
|
|
|
}
|
|
|
uni.hideLoading();
|
|
|
|
|
|
- setTimeout(() => uni.reLaunch({url:"/pages/hexiao/jxs/order"}), 1500);
|
|
|
+ setTimeout(() =>{
|
|
|
+ self.isLoading = false;
|
|
|
+ uni.reLaunch({url:"/pages/hexiao/jxs/order"});
|
|
|
+ }, 1500);
|
|
|
})
|
|
|
}
|
|
|
|