zhongtianhaoyuan il y a 3 ans
Parent
commit
5e16b07167

+ 18 - 2
pages/mine/cargoowner/editpersonalinformation.vue

@@ -147,7 +147,8 @@
 					cardAddressUrl: '',
 					cardAddressUrl: '',
 					cardBackAddressUrl: '',
 					cardBackAddressUrl: '',
 					cardValidityDate: '',
 					cardValidityDate: '',
-					driverSex: '男'
+					driverSex: '男',
+					cardValidityDate:"",
 				},
 				},
 				checked: false,
 				checked: false,
 				isShowcardValidity: false,
 				isShowcardValidity: false,
@@ -366,6 +367,7 @@
 											that.$request.baseRequest('get',
 											that.$request.baseRequest('get',
 													'/driverInfo/personShibie', {
 													'/driverInfo/personShibie', {
 														personImg: result,
 														personImg: result,
+														flag:1
 													}).then(res => {
 													}).then(res => {
 													that.dataDetails.cardNumber = res.data.recPersonNo
 													that.dataDetails.cardNumber = res.data.recPersonNo
 													if (!that.dataDetails.name) {
 													if (!that.dataDetails.name) {
@@ -380,7 +382,21 @@
 											// 身份反面
 											// 身份反面
 										case 2:
 										case 2:
 											that.dataDetails.cardBackAddressUrl = result
 											that.dataDetails.cardBackAddressUrl = result
-											that.$forceUpdate()
+											// 识别
+											that.$request.baseRequest('get',
+													'/driverInfo/personShibie', {
+														personImg: result,
+														flag:2
+													}).then(res => {
+														if(res.data.idCardValidity){
+															let date = res.data.idCardValidity.split("-")[1]
+														    that.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
+														}
+													that.$forceUpdate()
+												})
+												.catch(res => {
+													uni.$u.toast(res.message);
+												});
 											break
 											break
 									}
 									}
 								}
 								}

+ 17 - 1
pages/mine/company/addcompany.vue

@@ -631,6 +631,7 @@
 											_this.$request.baseRequest('get',
 											_this.$request.baseRequest('get',
 													'/driverInfo/personShibie', {
 													'/driverInfo/personShibie', {
 														personImg: result,
 														personImg: result,
+														flag:1
 													}).then(res => {
 													}).then(res => {
 													_this.dataDetails.cardNumber = res.data.recPersonNo
 													_this.dataDetails.cardNumber = res.data.recPersonNo
 													_this.$forceUpdate()
 													_this.$forceUpdate()
@@ -642,7 +643,22 @@
 											break
 											break
 										case 3:
 										case 3:
 										_this.dataDetails.cardBackAddressUrl = result
 										_this.dataDetails.cardBackAddressUrl = result
-											_this.$forceUpdate()
+											// 识别
+											_this.$request.baseRequest('get',
+													'/driverInfo/personShibie', {
+														personImg: result,
+														flag:2
+													}).then(res => {
+														if(res.data.idCardValidity){
+															let date = res.data.idCardValidity.split("-")[1]
+														    _this.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
+														}
+													_this.$forceUpdate()
+												})
+												.catch(res => {
+													uni.$u.toast(res.message);
+												});
+												_this.$forceUpdate()
 											break;
 											break;
 									}
 									}
 								}
 								}

+ 20 - 4
pages/mine/company/editcompany.vue

@@ -572,10 +572,11 @@
 						success: function(res) {
 						success: function(res) {
 							console.log(JSON.stringify(res.tempFilePaths));
 							console.log(JSON.stringify(res.tempFilePaths));
 							uploadImage('image', res.tempFilePaths[0], 'appData/',
 							uploadImage('image', res.tempFilePaths[0], 'appData/',
-								result => {
+								result => {debugger
 									// 上传成功回调函数
 									// 上传成功回调函数
 									switch (_this.uploadType) {
 									switch (_this.uploadType) {
 										
 										
+										
 										// 身份正面
 										// 身份正面
 										case 1:
 										case 1:
 											_this.dataDetails.businessLicenseAddressUrl = result
 											_this.dataDetails.businessLicenseAddressUrl = result
@@ -613,9 +614,9 @@
 										case 2:
 										case 2:
 											_this.dataDetails.cardAddressUrl = result
 											_this.dataDetails.cardAddressUrl = result
 											// 识别
 											// 识别
-											_this.$request.baseRequest('get',
-													'/driverInfo/personShibie', {
+											_this.$request.baseRequest('get','/driverInfo/personShibie', {
 														personImg: result,
 														personImg: result,
+														flag:1
 													}).then(res => {
 													}).then(res => {
 													_this.dataDetails.cardNumber = res.data.recPersonNo
 													_this.dataDetails.cardNumber = res.data.recPersonNo
 													_this.$forceUpdate()
 													_this.$forceUpdate()
@@ -623,10 +624,25 @@
 												.catch(res => {
 												.catch(res => {
 													uni.$u.toast(res.message);
 													uni.$u.toast(res.message);
 												});
 												});
-											
+											_this.$forceUpdate()
 											break
 											break
 										case 3:
 										case 3:
 										_this.dataDetails.cardBackAddressUrl = result
 										_this.dataDetails.cardBackAddressUrl = result
+										// 识别
+										_this.$request.baseRequest('get',
+												'/driverInfo/personShibie', {
+													personImg: result,
+													flag:2
+												}).then(res => {
+													if(res.data.idCardValidity){
+														let date = res.data.idCardValidity.split("-")[1]
+													    _this.dataDetails.cardValidityDate = date.replace('.', '-').replace('.', '-')
+													}
+												_this.$forceUpdate()
+											})
+											.catch(res => {
+												uni.$u.toast(res.message);
+											});
 											_this.$forceUpdate()
 											_this.$forceUpdate()
 											break;
 											break;
 									}
 									}