Pārlūkot izejas kodu

前端 小程序 sdy

zhongtianhaoyuan 3 gadi atpakaļ
vecāks
revīzija
4c2e696f1f

+ 34 - 46
pageD/identity/companyIdentityThree.vue

@@ -12,7 +12,6 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-
 			<view style="margin: 0 auto;height: 240px;" v-if="bank2 != ''" @click="bankLow()">
 			<view style="margin: 0 auto;height: 240px;" v-if="bank2 != ''" @click="bankLow()">
 				<image v-bind:src="bank2" class="picture"></image>
 				<image v-bind:src="bank2" class="picture"></image>
 				<view class="floats" v-if="certificatesTwo == true">
 				<view class="floats" v-if="certificatesTwo == true">
@@ -119,6 +118,7 @@
 				certificatesTwo: true,
 				certificatesTwo: true,
 				zhihangStatus: true,
 				zhihangStatus: true,
 				verification: true,
 				verification: true,
+				identityAuthenticationInfos:{},
 			}
 			}
 		},
 		},
 		computed: {
 		computed: {
@@ -278,7 +278,7 @@
 					this.$api.msg('手机号填写不正确')
 					this.$api.msg('手机号填写不正确')
 					return
 					return
 				}
 				}
-				if(!this.verifyCode){
+				if (!this.verifyCode) {
 					this.$api.msg('请填写验证码')
 					this.$api.msg('请填写验证码')
 					return
 					return
 				}
 				}
@@ -338,18 +338,16 @@
 							that.identityAuthenticationInfo.commonId = that.userInfo.id
 							that.identityAuthenticationInfo.commonId = that.userInfo.id
 							that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
 							that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
 							that.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 							that.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-
-							
-							
 							uni.showModal({
 							uni.showModal({
 								content: "粮商身份信息审核通过后不可修改,是否确定提交?",
 								content: "粮商身份信息审核通过后不可修改,是否确定提交?",
 								showCancel: true,
 								showCancel: true,
 								confirmText: '确定',
 								confirmText: '确定',
 								success: function(res) {
 								success: function(res) {
 									if (res.confirm) {
 									if (res.confirm) {
-										that.$api.doRequest('post',
-												'/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', that
-												.identityAuthenticationInfo)
+										that.identityAuthenticationInfos.customerPhone = that.identityAuthenticationInfo.customerPhone
+										that.$api.doRequest('get',
+												'/identityAuthenticationInfo/selectPhone', that
+												.identityAuthenticationInfos)
 											.then(res => {
 											.then(res => {
 												if (res.data.code == '11018') {
 												if (res.data.code == '11018') {
 													uni.showModal({
 													uni.showModal({
@@ -357,26 +355,20 @@
 														content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
 														content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
 														success: function(res) {
 														success: function(res) {
 															if (res.confirm) {
 															if (res.confirm) {
-																that.identityAuthenticationInfo.cover = 1
 																that.$api.doRequest('post',
 																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
+																		'/identityAuthenticationInfo/api/addIdentityAuthenticationInfo',that.identityAuthenticationInfo)
+																	.then(res => {
+																		if (res.data.code == 200) {
+																			uni.showToast({
+																				title: '提交成功',
+																				icon: 'none',
+																				duration: 2000
+																			})
+																			uni.navigateTo({
+																				url: `/pages/attestation/indexTwo`,
+																			})
+																		}
 																	})
 																	})
-																})
 															} else if (res.cancel) {
 															} else if (res.cancel) {
 																uni.showToast({
 																uni.showToast({
 																	title: '提交失败',
 																	title: '提交失败',
@@ -387,23 +379,23 @@
 														}
 														}
 													});
 													});
 												} else if (res.data.code == 200) {
 												} else if (res.data.code == 200) {
-													uni.showToast({
-														title: '提交成功',
-														icon: 'none',
-														duration: 2000
-													})
-													uni.navigateTo({
-														url: `/pages/attestation/indexTwo`,
+													that.$api.doRequest('post',
+															'/identityAuthenticationInfo/api/addIdentityAuthenticationInfo',
+															that.identityAuthenticationInfo)
+														.then(res => {
+															if (res.data.code == 200) {
+																uni.showToast({
+																	title: '提交成功',
+																	icon: 'none',
+																	duration: 2000
+																})
+																uni.navigateTo({
+																	url: `/pages/attestation/indexTwo`,
 
 
-													})
-												} else {
-													uni.showToast({
-														title: res.data.message,
-														icon: 'none',
-														duration: 2000
-													})
+																})
+															}
+														})
 												}
 												}
-										
 											}).catch(res => {
 											}).catch(res => {
 												uni.showToast({
 												uni.showToast({
 													title: res.data.message,
 													title: res.data.message,
@@ -414,12 +406,8 @@
 									} else if (res.cancel) {
 									} else if (res.cancel) {
 										// console.log('用户点击取消');
 										// console.log('用户点击取消');
 									}
 									}
-								},
+								}
 							})
 							})
-							
-							
-							
-
 						} else {
 						} else {
 							that.verification = false
 							that.verification = false
 							uni.showToast({
 							uni.showToast({

+ 0 - 1
pageD/identity/driverIdentity.vue

@@ -161,7 +161,6 @@
 					this.$api.msg('手机号不能为空')
 					this.$api.msg('手机号不能为空')
 					return
 					return
 				}
 				}
-				debugger
 				if (this.DriverViewInfo.driverPhone.length != 11) {
 				if (this.DriverViewInfo.driverPhone.length != 11) {
 					this.$api.msg('手机号输入错误')
 					this.$api.msg('手机号输入错误')
 					return
 					return

+ 272 - 146
pageD/identity/driverIdentityThree.vue

@@ -1,43 +1,47 @@
 <template>
 <template>
 	<view class="center">
 	<view class="center">
 		<view class="picture">
 		<view class="picture">
-			<view style="margin: 0 auto;height: 240px;" v-if="travels != ''"  @click="travel">
-				<image v-bind:src = "travels"  class="picture"></image>
+			<view style="margin: 0 auto;height: 240px;" v-if="travels != ''" @click="travel">
+				<image v-bind:src="travels" class="picture"></image>
 				<view class="floats" v-if="certificates == true">
 				<view class="floats" v-if="certificates == true">
-					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;"></image>
-				   <view class="words">
-				   	上传行驶证
-				   </view>
+					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
+					</image>
+					<view class="words">
+						上传行驶证
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view style="margin: 0 auto;height: 240px;" v-if="drives != ''"  @click="drive">
-				<image v-bind:src = "drives"  class="picture"></image>
+			<view style="margin: 0 auto;height: 240px;" v-if="drives != ''" @click="drive">
+				<image v-bind:src="drives" class="picture"></image>
 				<view class="floats" v-if="certificatesTwo == true">
 				<view class="floats" v-if="certificatesTwo == true">
-					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;"></image>
-				   <view class="words">
-				   	上传驾驶证
-				   </view>
+					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
+					</image>
+					<view class="words">
+						上传驾驶证
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			<view style="margin: 0 auto;height: 240px;" v-if="practices != ''"  @click="practice">
-				<image v-bind:src = "practices"  class="picture"></image>
+			<view style="margin: 0 auto;height: 240px;" v-if="practices != ''" @click="practice">
+				<image v-bind:src="practices" class="picture"></image>
 				<view class="floats" v-if="certificatesThree == true">
 				<view class="floats" v-if="certificatesThree == true">
-					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;"></image>
-				   <view class="words">
-				   	上传道路运营证
-				   </view>
+					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
+					</image>
+					<view class="words">
+						上传道路运营证
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view style="margin: 0 auto;height: 240px;" v-if="operates != ''" class="fujian" @click="operate">
 			<view style="margin: 0 auto;height: 240px;" v-if="operates != ''" class="fujian" @click="operate">
-				<image v-bind:src = "operates"  class="picture"></image> 
+				<image v-bind:src="operates" class="picture"></image>
 				<view class="floats" v-if="certificatesFour == true">
 				<view class="floats" v-if="certificatesFour == true">
-					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;"></image>
-				   <view class="words">
-				   	上传从业资格证
-				   </view>
+					<image src="../../static/img/authentication/xiangji@3x.png" style="width: 60px;height: 50px;">
+					</image>
+					<view class="words">
+						上传从业资格证
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
-			 <button class="btns btn"  @click="commit">提交</button>
+			<button class="btns btn" @click="commit">提交</button>
 
 
 		</view>
 		</view>
 
 
@@ -55,22 +59,22 @@
 				drives: "../../static/img/authentication/drive(3).png",
 				drives: "../../static/img/authentication/drive(3).png",
 				practices: "../../static/img/authentication/business@3x.png",
 				practices: "../../static/img/authentication/business@3x.png",
 				operates: "../../static/img/authentication/business@3x.png",
 				operates: "../../static/img/authentication/business@3x.png",
-				DriverViewInfo: {	
-				},
-				addressUrl:[],
-				certificates:true,
-				certificatesTwo:true,
-				certificatesThree:true,
-				certificatesFour:true,
+				DriverViewInfo: {},
+				addressUrl: [],
+				certificates: true,
+				certificatesTwo: true,
+				certificatesThree: true,
+				certificatesFour: true,
+				identityAuthenticationInfo:{},
 			}
 			}
 		},
 		},
 		computed: {
 		computed: {
 			...mapState(['hasLogin', 'userInfo'])
 			...mapState(['hasLogin', 'userInfo'])
 		},
 		},
-		onLoad(options){
+		onLoad(options) {
 			this.DriverViewInfo = JSON.parse(options.DriverViewInfo)
 			this.DriverViewInfo = JSON.parse(options.DriverViewInfo)
 		},
 		},
-		methods:{
+		methods: {
 			commit() {
 			commit() {
 				var that = this
 				var that = this
 				if (this.addressUrl[0] == "" || this.addressUrl[0] == null) {
 				if (this.addressUrl[0] == "" || this.addressUrl[0] == null) {
@@ -95,107 +99,225 @@
 				this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 				this.DriverViewInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
 
 
 				var that = this
 				var that = this
+				that.identityAuthenticationInfo.driverPhone = that.DriverViewInfo.driverPhone
 				uni.showModal({
 				uni.showModal({
-					content: "确认提交司机信息?",
-					showCancel: true,
-					confirmText: '确定',
-					success: function(res) {
-						if (res.confirm) {
-							that.$api.doRequest('post', '/driverViewInfo/api/addInfo', that.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
-														})
-														uni.navigateTo({
-															url: `/pages/attestation/indexThree` 
-														})
+							content: "确认提交司机信息?",
+							showCancel: true,
+							confirmText: '确定',
+							success: function(res) {
+								if (res.confirm) {
+									that.$api.doRequest('get', '/driverViewInfo/selectPhone', that.identityAuthenticationInfo)
+										.then(res => {
+											if (res.data.code == '11018') {
+												uni.showModal({
+													title: '提示',
+													content: '该手机号已认证过司机,再次认证将覆盖之前的认证信息,是否确定认证?',
+													success: function(res) {
+														if (res.confirm) {
+													
+															console.log(that.identityAuthenticationInfo, "已覆盖")
+															that.$api.doRequest('post','/driverViewInfo/api/addInfo', that.DriverViewInfo).then(res => {
+																if (res.data.code == 200) {
+																	uni.showToast({
+																		title: '提交成功',
+																		icon: 'none',
+																		duration: 2000
+																	})
+																	uni.navigateTo({
+																		url: `/pages/attestation/indexThree`
+																	})
+																} else if (res.data.code ==
+																	'ERROR002') {
+																	uni.showModal({
+																		title: '提示',
+																		content: '司机身份证号重复,添加失败',
+																	});
+																	uni.navigateTo({
+																		url: `/pages/attestation/indexThree`
+																	})
+																} else if (res.data.code == 'ERROR003') {
+																	uni.showModal({
+																		title: '提示',
+																		content: '收款人身份证号重复,添加失败',
+																	});
+																	uni.navigateTo({
+																		url: `/pages/attestation/indexThree`
+																	})
+																}
+															})
+														} else if (res.cancel) {
+															uni.showToast({
+																title: '提交失败',
+																icon: 'none',
+																duration: 2000
+															})
+														}
+													}
+												});
+											}else if(res.data.code == 200){
+												that.$api.doRequest('post','/driverViewInfo/api/addInfo', that.DriverViewInfo).then(res => {
+														if (res.data.code == 200) {
+															uni.showToast({
+																title: '提交成功',
+																icon: 'none',
+																duration: 2000
+															})
+															uni.navigateTo({
+																url: `/pages/attestation/indexThree`
+															})
+														} else if (res.data.code =='ERROR002') {
+															uni.showModal({
+																title: '提示',
+																content: '司机身份证号重复,添加失败',
+															});
+															uni.navigateTo({
+																url: `/pages/attestation/indexThree`
+															})
+														} else if (res.data.code == 'ERROR003') {
+															uni.showModal({
+																title: '提示',
+																content: '收款人身份证号重复,添加失败',
+															});
+															uni.navigateTo({
+																url: `/pages/attestation/indexThree`
+															})
+														}
 													})
 													})
-										        } 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/indexThree` 
-									})
-								}
-								
-							}).catch(res => {
-									uni.showToast({
-										title: res.data.message,
-										icon: 'none',
-										duration: 2000
-									})
+												// } else if (res.cancel) {
+												// 	uni.showToast({
+												// 		title: '提交失败',
+												// 		icon: 'none',
+												// 		duration: 2000
+												// 	})
+												// }
+											}
+										}).catch(res => {
+											uni.showToast({
+												title: res.data.message,
+												icon: 'none',
+												duration: 2000
+											})
+										})
+
+
+
+									// 	that.$api.doRequest('post', '/driverViewInfo/api/addInfo', that.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
+									// 								})
+									// 								uni.navigateTo({
+									// 									url: `/pages/attestation/indexThree`
+									// 								})
+									// 							})
+									// 						} else if (res.cancel) {
+									// 							uni.showToast({
+									// 								title: '提交失败',
+									// 								icon: 'none',
+									// 								duration: 2000
+									// 							})
+									// 						}
+									// 					}
+									// 				});
+									// 			} else if (res.data.code == 'ERROR002') {
+									// 				uni.showModal({
+									// 					title: '提示',
+									// 					content: '司机身份证号重复',
+									// 				});
+									// 			} else if (res.data.code == 'ERROR003') {
+									// 				uni.showModal({
+									// 					title: '提示',
+									// 					content: '收款人身份证号重复',
+									// 				});
+									// 			} else if (res.data.code == 200) {
+									// 				uni.showToast({
+									// 					title: '提交成功',
+									// 					icon: 'none',
+									// 					duration: 2000
+									// 				})
+									// 				uni.navigateTo({
+									// 					url: `/pages/attestation/indexThree`
+									// 				})
+									// 			} else if (res.data.code == 200) {
+									// 				uni.showToast({
+									// 					title: '提交成功',
+									// 					icon: 'none',
+									// 					duration: 2000
+									// 				})
+									// 				uni.navigateTo({
+									// 					url: `/pages/attestation/indexThree`
+									// 				})
+									// 			}
+
+									// 		}).catch(res => {
+									// 			uni.showToast({
+									// 				title: res.data.message,
+									// 				icon: 'none',
+									// 				duration: 2000
+									// 			})
+									// 		})
+									} else if (res.cancel) {
+										// console.log('用户点击取消');
+									}
+								},
+
 							})
 							})
-						} else if (res.cancel) {
-							// console.log('用户点击取消');
-						}
-					},
 
 
-				})
-				
-				
-				
-			},
-			travel(){
-				var that = this
-				wx.chooseImage({
-					success: function(res) {
-						wx.uploadFile({
-							url: 'https://www.zthymaoyi.com/upload/admin',
-							filePath: res.tempFilePaths[0],
-							name: 'file',
-							success(res) {
-								var data = res.data
-								var strToObj = JSON.parse(data)			
-								that.travels = strToObj.url
-								that.addressUrl[0] = strToObj.url
-								that.certificates = false
+
+
+					},
+					travel() {
+						var that = this
+						wx.chooseImage({
+							success: function(res) {
+								wx.uploadFile({
+									url: 'https://www.zthymaoyi.com/upload/admin',
+									filePath: res.tempFilePaths[0],
+									name: 'file',
+									success(res) {
+										var data = res.data
+										var strToObj = JSON.parse(data)
+										that.travels = strToObj.url
+										that.addressUrl[0] = strToObj.url
+										that.certificates = false
+									}
+								})
 							}
 							}
 						})
 						})
-					}
-				})
-				},
-				drive(){
-					var that = this
-					wx.chooseImage({
-						success: function(res) {
-							wx.uploadFile({
-								url: 'https://www.zthymaoyi.com/upload/admin',
-								filePath: res.tempFilePaths[0],
-								name: 'file',
-								success(res) {
-									var data = res.data
-									var strToObj = JSON.parse(data)			
-									that.drives = strToObj.url
+					},
+					drive() {
+						var that = this
+						wx.chooseImage({
+							success: function(res) {
+								wx.uploadFile({
+									url: 'https://www.zthymaoyi.com/upload/admin',
+									filePath: res.tempFilePaths[0],
+									name: 'file',
+									success(res) {
+										var data = res.data
+										var strToObj = JSON.parse(data)
+										that.drives = strToObj.url
 										that.addressUrl[1] = strToObj.url
 										that.addressUrl[1] = strToObj.url
-									that.certificatesTwo = false
-								}
-							})
-						}
-					})
+										that.certificatesTwo = false
+									}
+								})
+							}
+						})
 					},
 					},
-					practice(){
+					practice() {
 						var that = this
 						var that = this
 						wx.chooseImage({
 						wx.chooseImage({
 							success: function(res) {
 							success: function(res) {
@@ -205,16 +327,16 @@
 									name: 'file',
 									name: 'file',
 									success(res) {
 									success(res) {
 										var data = res.data
 										var data = res.data
-										var strToObj = JSON.parse(data)			
+										var strToObj = JSON.parse(data)
 										that.practices = strToObj.url
 										that.practices = strToObj.url
-											that.addressUrl[2] = strToObj.url
+										that.addressUrl[2] = strToObj.url
 										that.certificatesThree = false
 										that.certificatesThree = false
 									}
 									}
 								})
 								})
 							}
 							}
 						})
 						})
 					},
 					},
-					operate(){
+					operate() {
 						var that = this
 						var that = this
 						wx.chooseImage({
 						wx.chooseImage({
 							success: function(res) {
 							success: function(res) {
@@ -224,18 +346,18 @@
 									name: 'file',
 									name: 'file',
 									success(res) {
 									success(res) {
 										var data = res.data
 										var data = res.data
-										var strToObj = JSON.parse(data)			
+										var strToObj = JSON.parse(data)
 										that.operates = strToObj.url
 										that.operates = strToObj.url
-											that.addressUrl[3] = strToObj.url
+										that.addressUrl[3] = strToObj.url
 										that.certificatesFour = false
 										that.certificatesFour = false
 									}
 									}
 								})
 								})
 							}
 							}
 						})
 						})
 					},
 					},
-					
+
+			}
 		}
 		}
-	}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
@@ -243,31 +365,35 @@
 		padding: 10px 20px;
 		padding: 10px 20px;
 		background-color: #F5F6FA;
 		background-color: #F5F6FA;
 	}
 	}
-	.picture{
+
+	.picture {
 		width: 100%;
 		width: 100%;
-		 height: 220px;
-		 text-align: center;
-		 margin-top: 10px;
+		height: 220px;
+		text-align: center;
+		margin-top: 10px;
 	}
 	}
 
 
-		
-	
+
+
 	.btn {
 	.btn {
 		margin-top: 10px;
 		margin-top: 10px;
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
 		border-radius: 25px;
 		border-radius: 25px;
 		border: none;
 		border: none;
 	}
 	}
-	.btns{
+
+	.btns {
 		background-color: #22C572;
 		background-color: #22C572;
 	}
 	}
-	.words{
+
+	.words {
 		font-size: 18px;
 		font-size: 18px;
 		font-weight: 600;
 		font-weight: 600;
 		color: #617E8B;
 		color: #617E8B;
-		}
-		.floats{
-			position: relative;
-			top: -150px;
-		}
+	}
+
+	.floats {
+		position: relative;
+		top: -150px;
+	}
 </style>
 </style>

+ 99 - 32
pages/attestation/indexThree.vue

@@ -153,48 +153,115 @@
 			},
 			},
 			amendprice(item) {
 			amendprice(item) {
 				var that = this
 				var that = this
+				that.identityAuthenticationInfo.driverPhone = that.price
 				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
 				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
 						phone: this.price,
 						phone: this.price,
 						verifyCode: this.verifyCode
 						verifyCode: this.verifyCode
 					}).then(res => {
 					}).then(res => {
 						if (res.data.code == 200) {
 						if (res.data.code == 200) {
-							this.$api.doRequest('post', '/driverViewInfo/api/editInfo', {
-									driverPhone: this.price,
-									id: this.id,
-									commonId: this.userInfo.id
-								}, 'application/json;charset=UTF-8').then(res => {
-									if (res.data.code == 200) {
-										that.$api.msg('修改成功!')
-										that.pricestatusTwo = false
-										that.pricestatus = false
-										that.getList()
+							that.$api.doRequest('get','/driverViewInfo/selectPhone',that.identityAuthenticationInfo)
+							.then(res => {
+									if (res.data.code == '11018') {
+										uni.showModal({
+											title: '提示',
+											content: '该手机号已认证过司机,再次认证将覆盖之前的认证信息,是否确定认证?',
+											success: function(res) {										
+												if (res.confirm) {
+													that.identityAuthenticationInfo.id = item.id
+														console.log(that.identityAuthenticationInfo,"已覆盖")
+													that.$api.doRequest('post','/driverViewInfo/api/modifyPhone',that.identityAuthenticationInfo).then(
+														res => {
+															uni.showToast({
+																title: '提交成功',
+																icon: 'none',
+																duration: 2000
+															})
+															uni.navigateTo({
+																url: `/pages/attestation/indexThree`,
+															})
+														}).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){
+										that.identityAuthenticationInfo.id = item.id
+										console.log(that.identityAuthenticationInfo,"未覆盖")
+										that.$api.doRequest('post','/driverViewInfo/api/modifyPhone',that.identityAuthenticationInfo).then(
+											res => {
+												uni.showToast({
+													title: '提交成功',
+													icon: 'none',
+													duration: 2000
+												})
+												uni.navigateTo({
+													url: `/pages/attestation/indexThree`,
+												})
+											}).catch(res => {
+											uni.showToast({
+												title: res.data.message,
+												icon: 'none',
+												duration: 2000
+											})
+										})
 									}
 									}
-								})
-								.catch(res => {
+								}).catch(res => {
 									uni.showToast({
 									uni.showToast({
-										title: res.errmsg,
+										title: res.data.message,
 										icon: 'none',
 										icon: 'none',
 										duration: 2000
 										duration: 2000
 									})
 									})
-									return
-								});
-						} else {
-							uni.showToast({
-								title: res.data.message,
-								icon: 'none',
-								duration: 2000
-							})
-							return
-						}
-					})
-					.catch(res => {
-							uni.showToast({
-								title: res.data.message,
-								icon: 'none',
-								duration: 2000
-							})
-							return
-					});
+								})
+							}
+						})
+					// 	if (res.data.code == 200) {
+					// 		that.$api.doRequest('post',
+					// 			'/identityAuthenticationInfo/api/modifyIdentityPhone',
+					// 			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 {
+					// 		uni.showToast({
+					// 			title: res.data.message,
+					// 			icon: 'none',
+					// 			duration: 2000
+					// 		})
+					// 		return
+					// 	}
+					// })
+					// .catch(res => {
+					// 		uni.showToast({
+					// 			title: res.data.message,
+					// 			icon: 'none',
+					// 			duration: 2000
+					// 		})
+					// 		return
+					// });
 			},
 			},
 			getcode() {
 			getcode() {
 					if (!this.price) {
 					if (!this.price) {

+ 24 - 11
pages/attestation/indexTwo.vue

@@ -105,6 +105,7 @@
 				id: "",
 				id: "",
 				defaults1: "default1",
 				defaults1: "default1",
 				defaults2: "default2",
 				defaults2: "default2",
+				identityAuthenticationInfos:{},
 			}
 			}
 		},
 		},
 		computed: {
 		computed: {
@@ -201,21 +202,22 @@
 					});
 					});
 			},
 			},
 			amendprice(item) {
 			amendprice(item) {
+				this.identityAuthenticationInfo.id = item.id
+				this.identityAuthenticationInfo.customerPhone = this.price
 				var that = this
 				var that = this
 				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
 				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
 						phone: this.price,
 						phone: this.price,
 						verifyCode: this.verifyCode
 						verifyCode: this.verifyCode
 					}).then(res => {
 					}).then(res => {
 						if (res.data.code == 200) {
 						if (res.data.code == 200) {
-							that.$api.doRequest('get',
-									'/identityAuthenticationInfo/selectPhone', that
-									.identityAuthenticationInfo)
+							that.identityAuthenticationInfos.customerPhone = that.price
+							that.$api.doRequest('get','/identityAuthenticationInfo/selectPhone', that.identityAuthenticationInfos)
 								.then(res => {
 								.then(res => {
 									if (res.data.code == '11018') {
 									if (res.data.code == '11018') {
 										uni.showModal({
 										uni.showModal({
 											title: '提示',
 											title: '提示',
 											content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
 											content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
-											success: function(res) {
+											success: function(res) {										
 												if (res.confirm) {
 												if (res.confirm) {
 													that.$api.doRequest('post',
 													that.$api.doRequest('post',
 														'/identityAuthenticationInfo/api/modifyIdentityPhone',
 														'/identityAuthenticationInfo/api/modifyIdentityPhone',
@@ -246,13 +248,24 @@
 											}
 											}
 										});
 										});
 									} else if (res.data.code == 200) {
 									} else if (res.data.code == 200) {
-										uni.showToast({
-											title: '提交成功',
-											icon: 'none',
-											duration: 2000
-										})
-										uni.navigateTo({
-											url: `/pages/attestation/indexTwo`,
+										that.$api.doRequest('post',
+											'/identityAuthenticationInfo/api/modifyIdentityPhone',
+											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 {
 									} else {
 										uni.showToast({
 										uni.showToast({