实名认证界面加缓存数据

This commit is contained in:
2025-09-11 14:25:16 +08:00
parent 8f730c7d04
commit 3b8837ce68
4 changed files with 26 additions and 37 deletions

View File

@ -73,9 +73,6 @@
if( this.show ) { if( this.show ) {
await this.getDetail() await this.getDetail()
} }
},
async onShow() {
}, },
methods: { methods: {
async clickHandler() { async clickHandler() {

View File

@ -108,8 +108,6 @@
await this.getDetail() await this.getDetail()
} }
}, },
async onShow() {
},
methods: { methods: {
backInit() { backInit() {
this.form.recordNumber = '' this.form.recordNumber = ''

View File

@ -201,9 +201,6 @@
if(this.show) { if(this.show) {
await this.getDetail() await this.getDetail()
} }
},
async onShow() {
}, },
methods: { methods: {
confirmHandle(val){ confirmHandle(val){

View File

@ -49,7 +49,13 @@
import fixedButton from "./component/fixedButton"; import fixedButton from "./component/fixedButton";
import photoItem from "./component/photoItem"; import photoItem from "./component/photoItem";
import tipBar from "./component/tipBar"; 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 { leftCopy } from '@/utils/common.js'
import { myMixins } from '@/utils/myMixins.js' import { myMixins } from '@/utils/myMixins.js'
// import {version} from "@/utils/baseUrl" // import {version} from "@/utils/baseUrl"
@ -80,8 +86,6 @@
headerUrl: require('@/assets/authentication/person_header.png'), headerUrl: require('@/assets/authentication/person_header.png'),
idFront: require('@/assets/authentication/person_idcard1.png'), idFront: require('@/assets/authentication/person_idcard1.png'),
idBack: require('@/assets/authentication/person_idcard2.png'), idBack: require('@/assets/authentication/person_idcard2.png'),
user:'',
cardId:'',
show: undefined, show: undefined,
type: 'full', type: 'full',
esignFlag: false, esignFlag: false,
@ -93,17 +97,22 @@
if( this.show ) { if( this.show ) {
await this.getDetail() await this.getDetail()
} }
this.esignFlag = localStorage.getItem('esignFlag');
console.log("this.esignFlag ",this.esignFlag )
// } // }
}, },
async onShow() {
this.esignFlag = localStorage.getItem('esignFlag');
},
methods: { methods: {
async getDetail() { async getDetail() {
let res = await driverInfoVerifyDetail( { let res = await driverInfoVerifyDetail( {
verifyType: 1 verifyType: 1
}) })
leftCopy(this.form, {...res?.data?.personalInfoData}) 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) { async headerHandler(data) {
this.form.icon = data this.form.icon = data
@ -130,7 +139,6 @@
imageUrl: url imageUrl: url
}); });
let idInfo = res?.data?.data?.back?.data let idInfo = res?.data?.data?.back?.data
// let validPeriod = '2014.07.09-长期'
let validPeriod = idInfo?.validPeriod; // 有效期 let validPeriod = idInfo?.validPeriod; // 有效期
this.form.idCardAuthority = idInfo?.issueAuthority this.form.idCardAuthority = idInfo?.issueAuthority
let dateArr = validPeriod.split('-'); let dateArr = validPeriod.split('-');
@ -154,10 +162,6 @@
this.form.sex = idInfo?.sex this.form.sex = idInfo?.sex
this.form.identityCardNumber = idInfo?.idNumber this.form.identityCardNumber = idInfo?.idNumber
}, },
getParam(paramName) {//获取路径参数
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(paramName);
},
async goRealName() { async goRealName() {
if (!this.form.identityCardContrary) { if (!this.form.identityCardContrary) {
this.$toast('身份证反面照片未上传') this.$toast('身份证反面照片未上传')
@ -182,24 +186,8 @@
}) })
let info = res?.data let info = res?.data
console.log('info', info) 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.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 { } else {
this.$toast('身份证信息识别错误') this.$toast('身份证信息识别错误')
} }
@ -227,13 +215,22 @@
await this.getRegisterInfo({ await this.getRegisterInfo({
verifyType: 1 verifyType: 1
}) })
localStorage.setItem("personAuditInfo",'')
setTimeout(() => { setTimeout(() => {
this.h5GoBack()
}, 100) }, 100)
} else { } else {
this.$toast('身份证信息识别错误') 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> </script>