Ver Fonte

前端gjy

gjy há 3 anos atrás
pai
commit
ef965e2742

+ 55 - 7
pageD/identity/companyIdentityThree.vue

@@ -202,6 +202,7 @@
 				this.zhihangStatus = !this.zhihangStatus
 			},
 			commit() {
+				var that=this
 				if (this.bankid[0] == '' || this.bankid[0] == null) {
 					this.$api.msg('请上传银行卡正面')
 					return
@@ -260,17 +261,64 @@
 				this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this
 						.identityAuthenticationInfo)
 					.then(res => {
-						console.log(res.data.message)
-						if(res.data.message == "Success"){
+						// console.log(res.data.message)
+						// if(res.data.message == "Success"){
+						// 	uni.navigateTo({
+						// 		url: `/pages/attestation/indexTwo` ,
+						// 	})
+						// }else{				
+						// 		this.$api.msg(res.data.message)
+						// 		return
+						// }
+						if(res.data.code=='11018'){
+							uni.showModal({
+								title: '提示',
+								content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
+								success: function (res) {
+									if (res.confirm) {
+										that.identityAuthenticationInfo.cover=1
+											that.$api.doRequest('post', '/identityAuthenticationInfo/api/editIdentityAuthenticationInfo', that.identityAuthenticationInfo).then(res => {
+												uni.showToast({
+													title: '提交成功',
+													icon: 'none',
+													duration: 2000
+												})
+												uni.navigateTo({
+														url: `/pages/attestation/indexTwo` ,
+													})
+											}).catch(res => {
+												uni.showToast({
+													title: res.data.message,
+													icon: 'none',
+													duration: 2000
+												})
+											})
+								        } else if (res.cancel) {
+								          uni.showToast({
+								          	title: '提交失败',
+								          	icon: 'none',
+								          	duration: 2000
+								          })
+								        }
+								    }
+								});
+						}else if(res.data.code==200){
+							uni.showToast({
+								title: '提交成功',
+								icon: 'none',
+								duration: 2000
+							})
 							uni.navigateTo({
-								url: `/pages/attestation/indexTwo` ,
+									url: `/pages/attestation/indexTwo` ,
+								})
+						}else{
+							uni.showToast({
+								title: res.data.message,
+								icon: 'none',
+								duration: 2000
 							})
-						}else{				
-								this.$api.msg(res.data.message)
-								return
 						}
 						
-						
 					}).catch(res => {
 						uni.showToast({
 							title: res.data.message,

+ 38 - 6
pageD/identity/driverIdentityThree.vue

@@ -72,6 +72,7 @@
 		},
 		methods:{
 			commit() {
+				var that = this
 				if (this.addressUrl[0] == "" || this.addressUrl[0] == null) {
 					console.log(this.addressUrl)
 					this.$api.msg('请上传行驶证!')
@@ -97,14 +98,45 @@
 				this.DriverViewInfo.pcFlag = 0
 				this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 				console.log(this.DriverViewInfo,"司机对象")
-				return
 				this.$api.doRequest('post', '/driverViewInfo/api/addInfo', this.DriverViewInfo).then(res => {
+					if(res.data.code=='ERROR001'){
+						uni.showModal({
+							title: '提示',
+							content: '该手机号已认证过司机,再次认证将覆盖之前的认证信息,是否确定认证?',
+							success: function (res) {
+								if (res.confirm) {
+									that.DriverViewInfo.cover=1
+										that.$api.doRequest('post', '/driverViewInfo/api/editInfo', that.DriverViewInfo).then(res => {
+										}).catch(res => {
+											uni.showToast({
+												title: '提交成功',
+												icon: 'none',
+												duration: 2000
+											})
+										})
+							        } else if (res.cancel) {
+							          uni.showToast({
+							          	title: '提交失败',
+							          	icon: 'none',
+							          	duration: 2000
+							          })
+							        }
+							    }
+							});
+					}else if(res.data.code==200){
+						uni.showToast({
+							title: '提交成功',
+							icon: 'none',
+							duration: 2000
+						})
+					}
+					
 				}).catch(res => {
-					uni.showToast({
-						title: res.data.message,
-						icon: 'none',
-						duration: 2000
-					})
+						uni.showToast({
+							title: res.data.message,
+							icon: 'none',
+							duration: 2000
+						})
 				})
 			},
 			travel(){

+ 0 - 2
pageD/identity/driverIdentityTwo.vue

@@ -275,8 +275,6 @@
 					this.DriverViewInfo.driverPayeeInfoList = this.driverPayeeInfoList
 					this.DriverViewInfo.driverPayeeInfoList.payeeAddressUrl = this.bankimg
 					var model = JSON.stringify(this.DriverViewInfo);
-					console.log(this.DriverViewInfo,"sjijsoi")
-					return
 				uni.navigateTo({
 					url: `/pageD/identity/driverIdentityThree?DriverViewInfo=` + model
 				})

+ 2 - 0
pages/attestation/index.vue

@@ -147,11 +147,13 @@
 				},	
 				
 			liangShang(){
+				console.log(1111)
 				uni.navigateTo({
 					url: `/pages/attestation/indexTwo`
 				})
 			},
 			siJi(){
+				console.log(2222)
 				uni.navigateTo({
 					url: `/pages/attestation/indexThree`
 				})