zhangyuewww 3 yıl önce
ebeveyn
işleme
29b740f01e

+ 4 - 6
pageD/identity/companyIdentityThree.vue

@@ -335,12 +335,10 @@
 						verifyCode: this.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
-							this.identityAuthenticationInfo.commonId = this.userInfo.id
-							this.identityAuthenticationInfo.payeeAddressUrl = this.bankid.toString()
-							this.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
-							this.$api.doRequest('get',
-									'/identityAuthenticationInfo/selectPhone', this
-									.identityAuthenticationInfo)
+							that.identityAuthenticationInfo.commonId = that.userInfo.id
+							that.identityAuthenticationInfo.payeeAddressUrl = that.bankid.toString()
+							that.identityAuthenticationInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
+							that.$api.doRequest('get','/identityAuthenticationInfo/selectPhone', that.identityAuthenticationInfo)
 								.then(res => {
 									if (res.data.code == '11018') {
 										uni.showModal({

+ 54 - 28
pages/attestation/indexTwo.vue

@@ -207,61 +207,87 @@
 						verifyCode: this.verifyCode
 					}).then(res => {
 						if (res.data.code == 200) {
-							this.$api.doRequest('post', '/identityAuthenticationInfo/api/modifyIdentityPhone', {
-									customerPhone: 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()
-										// uni.navigateTo({
-										// 	url: '/pages/attestation/indexTwo'
-										// });
-
-									} else {
+							that.$api.doRequest('get',
+									'/identityAuthenticationInfo/selectPhone', that
+									.identityAuthenticationInfo)
+								.then(res => {
+									if (res.data.code == '11018') {
+										uni.showModal({
+											title: '提示',
+											content: '该手机号已认证过个人粮商,再次认证将覆盖之前的认证信息,是否确定认证?',
+											success: function(res) {
+												if (res.confirm) {
+													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 if (res.cancel) {
+													uni.showToast({
+														title: '提交失败',
+														icon: 'none',
+														duration: 2000
+													})
+												}
+											}
+										});
+									} else if (res.data.code == 200) {
 										uni.showToast({
-											title: res.errmsg,
+											title: '提交成功',
 											icon: 'none',
 											duration: 2000
 										})
-										return
-									}
-									if (res.data.code == "ERROR") {
+										uni.navigateTo({
+											url: `/pages/attestation/indexTwo`,
+										})
+									} else {
 										uni.showToast({
-											title: res.message,
+											title: res.data.message,
 											icon: 'none',
 											duration: 2000
 										})
-										return
 									}
-								})
-								.catch(res => {
+					
+								}).catch(res => {
 									uni.showToast({
-										title: res.errmsg,
+										title: res.data.message,
 										icon: 'none',
 										duration: 2000
 									})
-								});
-
-							// uni.hideLoading()
+								})
+					
 						} else {
-							// uni.hideLoading()1
+							that.verification = false
 							uni.showToast({
 								title: res.data.message,
 								icon: 'none',
 								duration: 2000
 							})
+							return false
 						}
 					})
 					.catch(res => {
+						that.verification = false
 						uni.showToast({
 							title: res.data.message,
 							icon: 'none',
 							duration: 2000
 						})
+						return false
 					});
 			},
 			getcode() {