Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

gjy 3 years ago
parent
commit
444dde4360

+ 2 - 2
config/index.js

@@ -1,7 +1,7 @@
 const dev = {
-	baseUrl: 'http://192.168.1.120:8090/',
+	baseUrl: 'http://192.168.1.121:8090/',
 	baseUrl: 'https://www.zthymaoyi.com',
-	baseUrlNew: 'http://192.168.1.120:8090/',
+	baseUrlNew: 'http://192.168.1.121:8090/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 57 - 4
pageD/identity/companyIdentityThree.vue

@@ -77,7 +77,7 @@
 			</view>
 		</view>
 		<view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
-			<button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
+			<button :class='codestatus&&!sendDisabled?"active":""' @click='obtain'
 				class='getcode'>{{sendText}}</button>
 			<view style='width:70%;position:relative;margin-left: 200px;'>
 				<input v-model='verifyCode' placeholder="请输入验证码" type="text">
@@ -125,6 +125,7 @@
 				certificates:true,
 				certificatesTwo:true,
 				zhihangStatus:true,
+				verification:true,
 			}
 		},
 		computed: {
@@ -134,6 +135,10 @@
 			this.identityAuthenticationInfo = JSON.parse(options.identityAuthenticationInfo)
 		},
 		methods: {
+			obtain(){
+				if(this.sendText == "获取验证码")
+				this.getcode()
+			},
 			bankUp() {
 				var that = this
 				wx.chooseImage({
@@ -221,6 +226,10 @@
 					this.$api.msg('手机号不能为空')
 					return
 				}
+				if (this.identityAuthenticationInfo.customerPhone.length != 11) {
+					this.$api.msg('手机号填写不正确')
+					return
+				}
 				if(this.identityAuthenticationInfo.customerTypeFlag == 1){
 					if (!this.identityAuthenticationInfo.payeeName) {
 						this.$api.msg('收款人姓名不能为空')
@@ -243,12 +252,26 @@
 			
 				this.identityAuthenticationInfo.commonId = this.userInfo.id
 				this.identityAuthenticationInfo.payeeAddressUrl = this.bankid.toString()
+				this.amendprice()
+				if(this.verification == false){
+					return
+				}
+				console.log(this.verification)
+				console.log("未成功")
+				return
 				this.$api.doRequest('post', '/identityAuthenticationInfo/api/addIdentityAuthenticationInfo', this
 						.identityAuthenticationInfo)
 					.then(res => {
-						uni.navigateTo({
-							url: `/pages/attestation/index` ,
-						})
+						console.log(res.data.message)
+						if(res.data.message == "Success"){
+							uni.navigateTo({
+								url: `/pages/attestation/indexTwo` ,
+							})
+						}else{				
+								this.$api.msg(res.data.message)
+								return
+						}
+						
 						
 					}).catch(res => {
 						uni.showToast({
@@ -263,6 +286,34 @@
 					this.codestatus=true
 				}
 			},
+			amendprice(item) {
+				var that = this
+				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+						phone: this.identityAuthenticationInfo.customerPhone,
+						verifyCode: this.verifyCode
+					}).then(res => {
+						if (res.data.code == 200) {
+						
+						} else {
+							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() {
 				var that = this
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.identityAuthenticationInfo.customerPhone)) {
@@ -287,6 +338,7 @@
 									icon: 'none',
 									duration: 2000
 								})
+								return
 							}
 						})
 						.catch(res => {
@@ -295,6 +347,7 @@
 								icon: 'none',
 								duration: 2000
 							})
+							return
 						});
 				} else {
 					uni.showToast({

+ 36 - 3
pageD/identity/driverIdentity.vue

@@ -103,6 +103,7 @@
 				personImgs:{},
 				certificatesTwo:true,
 				certificates:true,
+				verification:true,
 
 			}
 		},
@@ -140,18 +141,49 @@
 					this.$api.msg('常住城市不能为空')
 					return
 				}
+				this.amendprice()
+				if(this.verification == false){
+					return
+				}
 				this.DriverViewInfo.cardAddressUrl = this.id.toString()
 				var model = JSON.stringify(this.DriverViewInfo);
 				uni.navigateTo({
 					url: `/pageD/identity/driverIdentityTwo?DriverViewInfo=` + model,
 				})
 			},
+			amendprice() {
+				var that = this
+				this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
+						phone: this.DriverViewInfo.driverPhone,
+						verifyCode: this.verifyCode
+					}).then(res => {
+						if (res.data.code == 200) {
+							
+						} else {
+							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() {
 				var that = this
-				console.log(that.DriverViewInfo.driverPhone)
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.DriverViewInfo.driverPhone)) {
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
-							customerPhone: that.DriverViewInfo.driverPhone
+							phone: that.DriverViewInfo.driverPhone
 						}).then(res => {
 							if (res.data.code == 200) {
 								that.sendDisabled = true
@@ -171,6 +203,7 @@
 									icon: 'none',
 									duration: 2000
 								})
+								return
 							}
 						})
 						.catch(res => {
@@ -179,6 +212,7 @@
 								icon: 'none',
 								duration: 2000
 							})
+							return
 						});
 				} else {
 					uni.showToast({
@@ -187,7 +221,6 @@
 						duration: 2000
 					})
 				}
-
 			},
 			ModelChange(e) {
 				this.ModelIndex = e.detail.value

+ 33 - 11
pages/attestation/indexThree.vue

@@ -24,11 +24,11 @@
 			</view>
 			<view class="geren">{{item.driverPhone}}</view>
 			<hr style="margin: 10px 0;">
-			<view class="flex">
-				<view class="yuan">
+			<view class="flex options">
+				<!-- <view class="yuan">
 					<image src="../../static/img/authentication/selected(2).png"
 						style="width: 16px;height: 16px;top: 3px;">设为默认</image>
-				</view>
+				</view> -->
 				<view class='but' @click="open(item)">更换手机号</view>
 				<view class='but' @click="companyEdit(item)">修改</view>
 				<view class='but' @click="deleteSJ(item)">删除</view>
@@ -61,7 +61,7 @@
 					<view class="cancel" @click='pricestatusTwo=false,pricestatus=false'>×</view>
 					<view class='shade-content-item flex'>
 						<input v-model='verifyCode' placeholder="填写验证码" type="number" class="tainput1">
-						<text style="color:#AFB3BF;font-size: 14px;">{{sendText}}</text>
+						<text style="color:#AFB3BF;font-size: 14px;" @click="resend()">{{sendText}}</text>
 					</view>
 					<view>
 						<view class="flex">
@@ -108,6 +108,11 @@
 			this.getList()
 		},
 		methods: {
+			resend() {
+				if (this.sendText == "获取验证码") {
+					this.getcode()
+				}
+			},
 			open(item) {
 				this.id = item.id
 				this.pricestatus = !this.pricestatus
@@ -161,6 +166,7 @@
 										icon: 'none',
 										duration: 2000
 									})
+									return
 								});
 						} else {
 							uni.showToast({
@@ -168,6 +174,7 @@
 								icon: 'none',
 								duration: 2000
 							})
+							return
 						}
 					})
 					.catch(res => {
@@ -176,18 +183,30 @@
 								icon: 'none',
 								duration: 2000
 							})
+							return
 					});
 			},
 			getcode() {
-				if (!this.price) {
-					this.$api.msg('请填写手机号')
-					return
-				}
+		
+					if (!this.price) {
+						uni.showToast({
+							title: '请填写手机号!',
+							icon: 'none',
+							duration: 2000
+						})
+						return
+					}
+			
 				if (this.price.length != 11 ) {
-					this.$api.msg('请正确填写手机号')
+					uni.showToast({
+						title: '请正确填写手机号!',
+						icon: 'none',
+						duration: 2000
+					})
 					return
 				}
-				this.pricestatusTwo = !this.pricestatusTwo
+				this.pricestatusTwo = true
+				// this.pricestatusTwo = !this.pricestatusTwo
 				var that = this
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.price)) {
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
@@ -428,7 +447,7 @@
 		width: 100%;
 		background: rgba(0, 0, 0, 0.1);
 		height: 100%;
-		z-index: 999999;
+		z-index: 2;
 	}
 
 	.titel {
@@ -494,4 +513,7 @@
 		text-align: left;
 		border-radius: 3px;
 	}
+	.options{
+		justify-content: flex-end;
+	}
 </style>

+ 104 - 69
pages/attestation/indexTwo.vue

@@ -12,31 +12,31 @@
 						style="width: 16px;height: 16px;top:3px;"></image>
 					{{item.authenticationStatus}}
 				</view>
-				  <view class="status1" v-if="item.authenticationStatus == '审核中'">
-				  	{{item.authenticationStatus}}
-				  </view>
-				  <view class="status2" v-if="item.authenticationStatus == '未通过'">
-				  	{{item.authenticationStatus}}
-				  </view>
-				  <view class="status3" v-if="item.authenticationStatus == '已覆盖'">
-				  	{{item.authenticationStatus}}
-				  </view>			
+				<view class="status1" v-if="item.authenticationStatus == '审核中'">
+					{{item.authenticationStatus}}
+				</view>
+				<view class="status2" v-if="item.authenticationStatus == '未通过'">
+					{{item.authenticationStatus}}
 				</view>
-				<view class="geren" v-if="item.customerTypeFlag == 1"> {{item.customerPhone}}</view>
-				<view class="geren" v-if="item.customerTypeFlag == 2">{{item.customerName}}{{item.customerPhone}}	
+				<view class="status3" v-if="item.authenticationStatus == '已覆盖'">
+					{{item.authenticationStatus}}
+				</view>
+			</view>
+			<view class="geren" v-if="item.customerTypeFlag == 1"> {{item.customerPhone}}</view>
+			<view class="geren" v-if="item.customerTypeFlag == 2">{{item.customerName}}{{item.customerPhone}}
 			</view>
 			<hr style="margin: 10px 0;">
 			<view class="flex">
 				<view class="yuan flex">
-					<view v-bind:class="defaults1" @click="select(item)" v-if="item.basis == 'false'">√</view>
-					<view v-bind:class="defaults2" @click="select(item)" v-if="item.basis == 'true'">√</view>
-					<text @click="select(item)">设为默认</text>
-					<!-- <image src="../../static/img/authentication/selected(2).png"
-						style="width: 16px;height: 16px;top: 3px;">设为默认</image> -->
+					<view v-bind:class="defaults1" @click.stop="select(item)" v-if="item.basis == 'false'"></view>
+					<view v-bind:class="defaults2" @click.stop="select(item)" v-if="item.basis == 'true'">√</view>
+					<text @click.stop="select(item)">设为默认</text>
+				</view>
+				<view class="options flex">
+					<view class='but' @click="open(item)">更换手机号</view>
+					<view class='but' @click="companyEdit(item)">修改</view>
+					<view class='but' @click="deleteLS(item)">删除</view>
 				</view>
-				<view class='but' @click="open(item)">更换手机号</view>
-				<view class='but' @click="companyEdit(item)">修改</view>
-				<view class='but' @click="deleteLS(item)">删除</view>
 			</view>
 			<view v-if='pricestatus' class='shade'>
 				<view class='shade-content'>
@@ -66,7 +66,7 @@
 					<view class="cancel" @click='pricestatusTwo=false,pricestatus=false'>×</view>
 					<view class='shade-content-item flex'>
 						<input v-model='verifyCode' placeholder="填写验证码" type="number" class="tainput1">
-						<text style="color:#AFB3BF;font-size: 14px;">{{sendText}}</text>
+						<text style="color:#AFB3BF;font-size: 14px;" @click="resend">{{sendText}}</text>
 					</view>
 					<view>
 						<view class="flex">
@@ -101,8 +101,9 @@
 				sendText: "60s后重发",
 				verifyCode: "",
 				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
-				id:"",
-				defaults:"default1",
+				id: "",
+				defaults1: "default1",
+				defaults2: "default2",
 			}
 		},
 		computed: {
@@ -112,26 +113,39 @@
 			this.getList()
 		},
 		methods: {
-			select(item){
-				
-				if(item.basis == "false"){
-					this.defaults = "default2"
-				}else if(item.basis == "true"){
-					this.defaults = "default1"
+			resend() {
+				if (this.sendText == "获取验证码") {
+					this.getcode()
 				}
-				this.identityAuthenticationInfo.commonId= this.userInfo.id
+			},
+			select(item) {
+				if (item.basis == "false") {
+					for (var i = 0; i < this.businessman.length; i++) {
+						if (this.businessman[i] == item) {
+							item.basis = "true"
+						} else {
+							this.businessman[i].basis = "false"
+						}
+					}
+
+					// this.defaults1 = "default2"
+				} else if (item.basis == "true") {
+					item.basis = "false"
+					// this.defaults2 = "default1"
+				}
+				this.identityAuthenticationInfo.commonId = this.userInfo.id
 				this.identityAuthenticationInfo.defaultFlag = 1
-				return
-				this.$api.doRequest('post', '/identityAuthenticationInfo/api/setDefault',this.identityAuthenticationInfo, 'application/json;charset=UTF-8').then(res => {
-						console.log("成功连接")
-						this.businessman = res.data.data.records
-						for(var i = 0 ; i < this.businessman.length ; i++){
-							if(this.businessman.defaultFlag == 1){
+				this.identityAuthenticationInfo.id = item.id
+				this.$api.doRequest('post', '/identityAuthenticationInfo/api/setDefault', this.identityAuthenticationInfo,
+						'application/json;charset=UTF-8').then(res => {
+						for (var i = 0; i < this.businessman.length; i++) {
+							if (this.businessman.defaultFlag == 1) {
 								this.defaults = "default2"
-							}else{
+							} else {
 								this.defaults = "default1"
 							}
 						}
+						this.getList()
 					})
 					.catch(res => {
 						uni.showToast({
@@ -140,18 +154,7 @@
 							duration: 2000
 						})
 					});
-				
-			},
-			nextstep() {
-				if (!this.price) {
-					this.$api.msg('请填写手机号')
-					return
-				}
-				if (this.price.length != 11 ) {
-					this.$api.msg('请正确填写手机号')
-					return
-				}
-				// this.pricestatusTwo = !this.pricestatusTwo
+
 			},
 			open(item) {
 				this.id = item.id
@@ -170,13 +173,14 @@
 						currentPage: 1,
 						commonId: this.userInfo.id
 					}, 'application/json;charset=UTF-8').then(res => {
-						console.log("成功连接")
-						
-						for(var i = 0 ; i < res.data.data.records.length ; i++){
-
+						for (var i = 0; i < res.data.data.records.length; i++) {
 							res.data.data.records[i].basis = "false"
+							if (res.data.data.records[i].defaultFlag == 1) {
+								res.data.data.records[i].basis = "true"
+							}
 						}
 						this.businessman = res.data.data.records
+
 					})
 					.catch(res => {
 						uni.showToast({
@@ -202,7 +206,22 @@
 											url: '/pages/attestation/indexTwo'
 										});
 										this.$api.msg('修改成功!')
-									}				
+									} else {
+										uni.showToast({
+											title: res.errmsg,
+											icon: 'none',
+											duration: 2000
+										})
+										return
+									}
+									if (res.data.code == "ERROR") {
+										uni.showToast({
+											title: res.message,
+											icon: 'none',
+											duration: 2000
+										})
+										return
+									}
 								})
 								.catch(res => {
 									uni.showToast({
@@ -215,6 +234,7 @@
 							// uni.hideLoading()
 						} else {
 							// uni.hideLoading()
+							console.log(res.data.message, "aaaaa")
 							uni.showToast({
 								title: res.data.message,
 								icon: 'none',
@@ -223,24 +243,33 @@
 						}
 					})
 					.catch(res => {
-							uni.showToast({
-
-								title: res.data.message,
-								icon: 'none',
-								duration: 2000
-							})
+						uni.showToast({
+							title: res.data.message,
+							icon: 'none',
+							duration: 2000
+						})
 					});
 			},
 			getcode() {
 				if (!this.price) {
-					this.$api.msg('请填写手机号')
+					console.log(this.$api)
+					uni.showToast({
+						title: '请填写手机号!',
+						icon: 'none',
+						duration: 2000
+					})
 					return
 				}
-				if (this.price.length != 11 ) {
-					this.$api.msg('请正确填写手机号')
+				if (this.price.length != 11) {
+					uni.showToast({
+						title: '请正确填写手机号!',
+						icon: 'none',
+						duration: 2000
+					})
 					return
 				}
-				this.pricestatusTwo = !this.pricestatusTwo
+				this.pricestatusTwo = true
+				// this.pricestatusTwo = !this.pricestatusTwo
 				var that = this
 				if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(this.price)) {
 					this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
@@ -455,7 +484,7 @@
 		top: 50%;
 		left: 50%;
 		transform: translateX(-50%) translateY(-50%);
-		z-index: 999999;
+		z-index: 2;
 		text-align: center;
 		border-radius: 20px;
 	}
@@ -474,7 +503,7 @@
 		width: 100%;
 		background: rgba(0, 0, 0, 0.1);
 		height: 100%;
-		z-index: 999999;
+		z-index: 2;
 	}
 
 	.titel {
@@ -540,7 +569,8 @@
 	.btn2 {
 		color: #22C572;
 	}
-	.default1{
+
+	.default1 {
 		width: 16px;
 		height: 16px;
 		border: 1px solid #AFB3BF;
@@ -548,10 +578,11 @@
 		text-align: center;
 		line-height: 16px;
 		color: #FFFFFF;
-		margin-right: 3px ;
+		margin-right: 3px;
 		margin-top: 2px;
 	}
-	.default2{
+
+	.default2 {
 		width: 16px;
 		height: 16px;
 		border: 1px solid #AFB3BF;
@@ -559,8 +590,12 @@
 		text-align: center;
 		line-height: 16px;
 		color: #FFFFFF;
-		margin-right: 3px ;
+		margin-right: 3px;
 		margin-top: 2px;
 		background-color: #22C572;
 	}
+
+	.options {
+		justify-content: flex-end;
+	}
 </style>