Ver Fonte

loading

chenxiong há 3 anos atrás
pai
commit
5514710f34
2 ficheiros alterados com 19 adições e 16 exclusões
  1. 14 8
      pages2/verify/input.vue
  2. 5 8
      pages2/verify/input2.vue

+ 14 - 8
pages2/verify/input.vue

@@ -625,15 +625,14 @@ export default {
 					orderGoodsId:this.orderGoodsId,
 					keyValue: JSON.stringify(arsty)
 				};
-				if(this.isUploading) {
-					return;
-				}
-				this.isUploading = true;
 				this.$api.editbaseprofiletp(datas).then(res => {
 					this.isUploading = false;
 					if (res.data.code === 200) {
 						this.$method.showToast('提交成功');
 						uni.navigateBack();
+					} else {
+						this.$method.showToast(res.data.msg);
+						this.isUploading = false;
 					}
 				});
 			} else {
@@ -658,15 +657,14 @@ export default {
 					orderGoodsId:this.orderGoodsId,
 					keyValue: JSON.stringify(objs)
 				};
-				if(this.isUploading) {
-					return;
-				}
-				this.isUploading = true;
 				this.$api.addbaseprofiletp(datas).then(res => {
 					this.isUploading = false;
 					if (res.data.code === 200) {
 						this.$method.showToast('提交成功');
 						uni.navigateBack();
+					} else {
+						this.$method.showToast(res.data.msg);
+						this.isUploading = false;
 					}
 				});
 			}
@@ -718,6 +716,7 @@ export default {
 									this.submitApi();
 								}
 							} else {
+								this.isUploading = false;
 								this.errorType = ['message'];
 								console.log(this.form)
 								console.log('验证失败');
@@ -729,6 +728,11 @@ export default {
 			}
 		},
 		async submits() {
+			
+			if(this.isUploading) {
+				return;
+			}
+			this.isUploading = true;
 			var ast = this.listData.some(item => {
 				return item.fieldKey === 'commitment_electr_signature';
 			});
@@ -1014,6 +1018,8 @@ export default {
 							title: '签名上传失败',
 							icon: 'error'
 						});
+						
+							this.isUploading = false;
 					});
 			});
 		}

+ 5 - 8
pages2/verify/input2.vue

@@ -236,10 +236,6 @@ export default {
 			};
 			if (self.remarkStatus) {
 				datas.id = self.id;
-				if(this.isUploading) {
-					return;
-				}
-				this.isUploading = true;
 				self.$api.editbaseprofileStamp(datas).then(res => {
 					this.isUploading = false;
 					if (res.data.code === 200) {
@@ -248,10 +244,6 @@ export default {
 					}
 				});
 			} else {
-				if(this.isUploading) {
-					return;
-				}
-				this.isUploading = true;
 				self.$api.addbaseprofileStamp(datas).then(res => {
 					this.isUploading = false;
 					if (res.data.code === 200) {
@@ -276,12 +268,17 @@ export default {
 							this.submitApi();
 						}
 					} else {
+						this.isUploading = false;
 						console.log('验证失败');
 					}
 				});
 			}
 		},
 		submits() {
+			if(this.isUploading) {
+				return;
+			}
+			this.isUploading = true;
 			this.openVerify = true;
 			this.resultForm(1);
 		},