zouling 7 mesiacov pred
rodič
commit
2a856eaeb1

+ 15 - 0
api/mine/card.js

@@ -102,6 +102,13 @@ export function getIdCardDet(data) {
     'method': 'get',
   })
 }
+//用户身份证信息列表-删除idcard:idcard:remove
+export function getIdCardDel(data) {
+  return request({
+    'url': '/idCard/delete/'+data,
+    'method': 'get',
+  })
+}
 
 //人脸识别阿里云金融级实人认证
 export function getOcrFn(data) {
@@ -111,6 +118,14 @@ export function getOcrFn(data) {
 	'data':data
   })
 }
+//人脸识别百度V4版本H5
+export function getOcrH5Fn(data) {
+  return request({
+    'url': '/idCard/h',
+    'method': 'post',
+	'data':data
+  })
+}
 
 //修改人脸识别状态
 export function getChangeFace(data) {

+ 14 - 8
hybrid/html/face.html

@@ -22,9 +22,9 @@
 			data: {
 				metaInfo: '',
 				baseUrl: 'http://47.99.82.249:6001/prod-api'
+				// baseUrl: 'http://192.168.101.245:8056'
 			},
 			mounted() {
-				console.log(baseUrl,1)
 				let query = this.getQuery('data')
 				if (!query) {
 					alert('参数不存在')
@@ -53,12 +53,18 @@
 					var params = {
 						idCard: item.idCard,
 						realName: item.realName,
+						expirationDate: item.expirationDate,
+						phonenumber: item.phonenumber,
+						address: item.address,
+						front: item.front,
+						back: item.back,
+						userId: item.userId,
 						metaInfo: this.metaInfo,
-						returnUrl:item.returnUrl
+						returnUrl:item.returnUrl,
 					}
-					var baseUrl = this.baseUrl
+					var baseUrl = this.baseUrl;
 					$.ajax({
-						url: baseUrl + '/ocr/ocrSampleAliYun',
+						url: baseUrl + '/ocr/ocrSampleAliYunH',
 						type: 'post',
 						dataType: 'json',
 						contentType : 'application/json',
@@ -70,10 +76,10 @@
 								window.location.href = certifyUrl;
 
 							} else {
-								that.$message({
-									message: res.msg,
-									type: 'error'
-								});
+								// that.$message({
+								// 	message: res.msg,
+								// 	type: 'error'
+								// });
 							}
 						}
 					})

+ 10 - 1
pages.json

@@ -44,7 +44,16 @@
 	  	"titleNView":false
 	  	}
     }
-  }, 
+  },
+   {
+     "path": "pages/success",
+     "style": {
+       "navigationBarTitleText": "注册",
+   	  "h5":{
+   	  	"titleNView":false
+   	  	}
+     }
+   }, 
 	{
 	  "path": "pages/agreement",
 	  "style": {

+ 3 - 3
pages/common/webview/faceauth.vue

@@ -25,9 +25,9 @@ export default {
       // }
     },
     onLoad(e) {
-		this.params = JSON.parse(decodeURIComponent(e.data))
-		
+		var params = JSON.parse(decodeURIComponent(e.data))
 		var token=getToken()
+		params.token=token
 		// const token = await tokenInvalidReturnInfo(3)
 		let data = {
 			idCard: this.params.idCard,
@@ -36,7 +36,7 @@ export default {
 			// handel_type: this.params.handelType,
 			token: token
 		}
-		this.src = '/hybrid/html/face.html?data='+encodeURIComponent(JSON.stringify(data))
+		this.src = '/hybrid/html/face.html?data='+encodeURIComponent(JSON.stringify(params))
     }
   }
 </script>

+ 8 - 1
pages/custom/index.vue

@@ -40,7 +40,7 @@
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	
 	let { calendar } = require("@/components/lunc-calendar/calendar.js");
-	import {getIdCardList,} from "@/api/mine/card.js"
+	import {getIdCardList,getIdCardDel} from "@/api/mine/card.js"
 	import {getDictionaryFn} from "@/api/mine/register.js"
 	import busList from "@/work/components/business/list.vue"
 	import footers from '@/components/footer/footer.vue'
@@ -162,6 +162,13 @@
 		getDetail(e){
 			this.$tab.navigateTo("/work/pages/custom/details?id="+e)
 		},
+		getIdCardDel(id){
+			this.$modal.confirm('确定删除该信息吗?').then(() => {
+			  getIdCardDel(id).then(res=>{
+			  	
+			  })
+			})	
+		},
 		getDataFn(){
 			var params={
 				pageSize:this.pageSize,

+ 19 - 3
pages/login.vue

@@ -111,6 +111,7 @@
 	import {getUserProfile,updateUserProfile} from "@/api/system/user.js"
 	import { getToken } from '@/utils/auth'
 	import phoneBtn from "@/components/toptab/phonebtn.vue"
+	import {getOcrH5Fn} from "@/api/mine/card.js"
   export default {
 	  components:{
 		  phoneBtn
@@ -219,9 +220,24 @@
 			  
 		     this.$modal.closeLoading()
 		 		  this.$toast('登录成功')
-		 		  setTimeout(function(){
-		 			  that.loginSuccess()
-		 		  },1500)
+				  var certifyId= uni.getStorageSync('certifyId')||""
+				  if(certifyId){
+					  var params={
+					  	certifyId:certifyId
+					  } 
+					getOcrH5Fn(params).then(resa=>{
+						if(resa.code==200){
+							uni.removeStorageSync('certifyId')
+							that.loginSuccess()
+						}							  
+					 })
+				  }else{
+					 setTimeout(function(){
+					 	that.loginSuccess()
+					 },1500) 
+				  }
+				  
+		 		  
 		     
 		   }).catch((error) => {
 		    setTimeout(function(){

+ 82 - 0
pages/success.vue

@@ -0,0 +1,82 @@
+<template>
+	<view class="sucbox">
+		<view class="subtop">
+			<image :src="sucimg"></image>
+			<view class="tit">您的认证已成功</view>
+			<!-- <view class="tit">请您耐心等待审核</view> -->
+			<!-- <view class="txt" @click="getNodata">查看业务申报详情</view> -->
+		</view>
+		
+		<view class="back" @click="getHome">返回首页</view>
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import { getToken } from '@/utils/auth'
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {getOcrH5Fn} from "@/api/mine/card.js"
+	export default{
+		components:{},
+		data(){
+			return{
+				sucimg:require('@/work/static/images/success.png'),
+			}
+		},
+		onLoad(e) {
+			var that=this;
+			// #ifndef APP-PLUS
+			if(e.response){
+				var face='Y'
+				var data=JSON.parse(decodeURIComponent(e.response))
+				console.log(data)
+				if(data.code==1000){
+					that.$store.dispatch('checkInitFace', face).then(() => {
+					})
+					if(data.extInfo){
+						var certifyId=data.extInfo.certifyId;
+						console.log(certifyId)
+						if(getToken()){
+							var params={
+								certifyId:certifyId
+							}
+							getOcrH5Fn(params).then(resa=>{
+								if(resa.code==200){
+									
+								}							  
+							})
+						}else{
+							uni.setStorageSync('certifyId',certifyId);
+							that.$tab.reLaunch('/pages/login')
+						}	
+					}	
+				}
+			}
+			// #endif
+		},
+		methods:{
+			checkPermi, checkRole,
+			getHome(){
+				this.$tab.reLaunch('/pages/index/index')
+			},
+			getNodata(){
+				this.$tab.navigateTo('/work/pages/nodata')
+			}
+		}
+	}
+</script>
+<style>
+	page{background:#ffffff;}
+</style>
+<style lang="scss" scoped>
+.sucbox{min-height: 100vh;display: flex;flex-direction: column;padding: 100rpx 0 200rpx;align-items: center;
+	.subtop{
+		flex: 1;display: flex;flex-direction: column;align-items: center;
+		image{width: 550rpx;height: 450rpx;margin: 0 auto 40rpx;}
+		.tit{font-weight: bold;font-size: 30rpx;color: #222327;padding-top: 6rpx;}
+		.txt{font-weight: bold;font-size: 30rpx;color: #00A9F0;margin-top: 60rpx;}
+	}
+	.back{font-weight: bold;font-size: 30rpx;flex: 0 0 auto;color: #666666;text-align: center;}
+}
+</style>

+ 6 - 4
work/pages/prove/index.vue

@@ -107,15 +107,17 @@
 				this.getFace()
 				// #endif
 				// #ifndef APP-PLUS
-				this.$toast("请在app端进行认证")
+				// this.$toast("请在app端进行认证")
 				// 跳h5页面进行人脸认证
-				// var user=this.user;
+				var user=JSON.parse(JSON.stringify(this.user));
+				user.userId=this.userId;
+				user.returnUrl='https://rzdbh.qs163.cn/pages/success';
 				// var data={
 				// 	idCard:user.idCard,
 				// 	realName:user.realName,
-				// 	returnUrl:'https://rzdb.qs163.cn'
+				// 	returnUrl:'http://192.168.101.147:9092/pages/success'
 				// }
-				// this.$tab.navigateTo('/pages/common/webview/faceauth?data='+encodeURIComponent(JSON.stringify(data)))
+				this.$tab.navigateTo('/pages/common/webview/faceauth?data='+encodeURIComponent(JSON.stringify(user)))
 				// #endif
 			},
 			getFace(){