|
|
|
@@ -49,7 +49,13 @@
|
|
|
|
|
import fixedButton from "./component/fixedButton";
|
|
|
|
|
import photoItem from "./component/photoItem";
|
|
|
|
|
import tipBar from "./component/tipBar";
|
|
|
|
|
import { ocrRecognize, driverInfoVerify, driverInfoVerifyDetail, driverRealName } from '@/api/authentication'
|
|
|
|
|
import {
|
|
|
|
|
ocrRecognize,
|
|
|
|
|
driverInfoVerify,
|
|
|
|
|
driverInfoVerifyDetail,
|
|
|
|
|
driverRealName,
|
|
|
|
|
infoVerifyProgress
|
|
|
|
|
} from '@/api/authentication'
|
|
|
|
|
import { leftCopy } from '@/utils/common.js'
|
|
|
|
|
import { myMixins } from '@/utils/myMixins.js'
|
|
|
|
|
// import {version} from "@/utils/baseUrl"
|
|
|
|
@@ -80,8 +86,6 @@
|
|
|
|
|
headerUrl: require('@/assets/authentication/person_header.png'),
|
|
|
|
|
idFront: require('@/assets/authentication/person_idcard1.png'),
|
|
|
|
|
idBack: require('@/assets/authentication/person_idcard2.png'),
|
|
|
|
|
user:'',
|
|
|
|
|
cardId:'',
|
|
|
|
|
show: undefined,
|
|
|
|
|
type: 'full',
|
|
|
|
|
esignFlag: false,
|
|
|
|
@@ -93,10 +97,9 @@
|
|
|
|
|
if( this.show ) {
|
|
|
|
|
await this.getDetail()
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
async onShow() {
|
|
|
|
|
this.esignFlag = localStorage.getItem('esignFlag');
|
|
|
|
|
console.log("this.esignFlag ",this.esignFlag )
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async getDetail() {
|
|
|
|
@@ -104,6 +107,12 @@
|
|
|
|
|
verifyType: 1
|
|
|
|
|
})
|
|
|
|
|
leftCopy(this.form, {...res?.data?.personalInfoData})
|
|
|
|
|
let personAuditInfo=localStorage.getItem("personAuditInfo") ? JSON.parse(localStorage.getItem("personAuditInfo")) : ''
|
|
|
|
|
if(!personAuditInfo){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
console.log('personAuditInfo.form',personAuditInfo.form)
|
|
|
|
|
this.form={...personAuditInfo.form}
|
|
|
|
|
},
|
|
|
|
|
async headerHandler(data) {
|
|
|
|
|
this.form.icon = data
|
|
|
|
@@ -130,7 +139,6 @@
|
|
|
|
|
imageUrl: url
|
|
|
|
|
});
|
|
|
|
|
let idInfo = res?.data?.data?.back?.data
|
|
|
|
|
// let validPeriod = '2014.07.09-长期'
|
|
|
|
|
let validPeriod = idInfo?.validPeriod; // 有效期
|
|
|
|
|
this.form.idCardAuthority = idInfo?.issueAuthority
|
|
|
|
|
let dateArr = validPeriod.split('-');
|
|
|
|
@@ -154,10 +162,6 @@
|
|
|
|
|
this.form.sex = idInfo?.sex
|
|
|
|
|
this.form.identityCardNumber = idInfo?.idNumber
|
|
|
|
|
},
|
|
|
|
|
getParam(paramName) {//获取路径参数
|
|
|
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
|
|
return urlParams.get(paramName);
|
|
|
|
|
},
|
|
|
|
|
async goRealName() {
|
|
|
|
|
if (!this.form.identityCardContrary) {
|
|
|
|
|
this.$toast('身份证反面照片未上传')
|
|
|
|
@@ -182,24 +186,8 @@
|
|
|
|
|
})
|
|
|
|
|
let info = res?.data
|
|
|
|
|
console.log('info', info)
|
|
|
|
|
// window.location.href=info?.shortLink+'?token='+this.getParam('token')
|
|
|
|
|
localStorage.setItem("personAuditInfo",JSON.stringify({form:this.form}))
|
|
|
|
|
window.location.href=info?.shortLink
|
|
|
|
|
|
|
|
|
|
// window.open(info?.shortLink)
|
|
|
|
|
/* let env = version=='release' ? 'prod' : 'sml'
|
|
|
|
|
wx.navigateToMiniProgram({
|
|
|
|
|
appId: 'wx1cf2708c2de46337', // 上链公证签小程序APPID
|
|
|
|
|
path: '/pages/index/index', // 上链公证签页面地址
|
|
|
|
|
extraData: {
|
|
|
|
|
requestObj: { // 必填,入参
|
|
|
|
|
flowId: info?.flowId, // 必填,认证流程Id
|
|
|
|
|
type: 'REALNAME',// 必填,业务类型:实名 REALNAME
|
|
|
|
|
env: env // 非必填,对接环境:线上 prod(默认), 模拟 sml(用于对接调试阶段)
|
|
|
|
|
},
|
|
|
|
|
callbackObj: { // 非必填,回传数据:签署完成后会将此数据完整回传
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
})*/
|
|
|
|
|
} else {
|
|
|
|
|
this.$toast('身份证信息识别错误')
|
|
|
|
|
}
|
|
|
|
@@ -227,13 +215,22 @@
|
|
|
|
|
await this.getRegisterInfo({
|
|
|
|
|
verifyType: 1
|
|
|
|
|
})
|
|
|
|
|
localStorage.setItem("personAuditInfo",'')
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
|
|
this.h5GoBack()
|
|
|
|
|
}, 100)
|
|
|
|
|
} else {
|
|
|
|
|
this.$toast('身份证信息识别错误')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getRegisterInfo(data) {
|
|
|
|
|
let res = await infoVerifyProgress( data)
|
|
|
|
|
// console.log("res",res)
|
|
|
|
|
localStorage.setItem('infoVerify', res?.data?.infoVerify?.code)
|
|
|
|
|
localStorage.setItem('failReason', res?.data?.verifyRemark)
|
|
|
|
|
localStorage.setItem('authIsSuccess', res?.data?.authIsSuccess)
|
|
|
|
|
localStorage.setItem('name', res?.data?.name)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|