feat: 认证页发起人脸前先查中奖预检,未中奖提示「您暂未中奖,请中奖后再进入认证」,避免过度消耗实名认证费用(需先发布后端 checkWinner 接口)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
f6c282237d
commit
8ec4ef304f
@@ -12,6 +12,8 @@ const StoreDetailUrl = 'mp-api/hhrsStore/detail'
|
|||||||
const RightsListUrl = 'mp-api/hhrsRights/list'
|
const RightsListUrl = 'mp-api/hhrsRights/list'
|
||||||
const RightsDetailUrl = 'mp-api/hhrsRights/detail'
|
const RightsDetailUrl = 'mp-api/hhrsRights/detail'
|
||||||
const EligibilityUrl = 'mp-api/hhrsRights/eligibility'
|
const EligibilityUrl = 'mp-api/hhrsRights/eligibility'
|
||||||
|
// xuchao: 认证前中奖预检(未中奖拦截人脸核验,省认证费)
|
||||||
|
const WinnerCheckUrl = 'mp-api/hhrsRights/checkWinner'
|
||||||
const AppointmentListUrl = 'mp-api/hhrsRights/appointment/list'
|
const AppointmentListUrl = 'mp-api/hhrsRights/appointment/list'
|
||||||
const CheckListUrl = 'mp-api/hhrsRights/check/list'
|
const CheckListUrl = 'mp-api/hhrsRights/check/list'
|
||||||
// 实名人脸认证(阿里云)
|
// 实名人脸认证(阿里云)
|
||||||
@@ -45,6 +47,8 @@ const install = (Vue, vm) => {
|
|||||||
const getRightsDetail = (params = {}) => vm.$u.post(RightsDetailUrl, params)
|
const getRightsDetail = (params = {}) => vm.$u.post(RightsDetailUrl, params)
|
||||||
// xuchao: 注意 identityNo 会触发后端“被动认证”回写,仅在认证流程中传
|
// xuchao: 注意 identityNo 会触发后端“被动认证”回写,仅在认证流程中传
|
||||||
const getEligibility = (params = {}) => vm.$u.post(EligibilityUrl, params)
|
const getEligibility = (params = {}) => vm.$u.post(EligibilityUrl, params)
|
||||||
|
// xuchao: 发起人脸前查证件号是否在中奖名单,返回 data.isWinner
|
||||||
|
const checkWinner = (params = {}) => vm.$u.post(WinnerCheckUrl, params)
|
||||||
const getAppointmentList = (params = {}) => vm.$u.post(AppointmentListUrl, params)
|
const getAppointmentList = (params = {}) => vm.$u.post(AppointmentListUrl, params)
|
||||||
const getCheckList = (params = {}) => vm.$u.post(CheckListUrl, params)
|
const getCheckList = (params = {}) => vm.$u.post(CheckListUrl, params)
|
||||||
const doAppoint = (params = {}) => vm.$u.post(AppointUrl, params)
|
const doAppoint = (params = {}) => vm.$u.post(AppointUrl, params)
|
||||||
@@ -72,6 +76,7 @@ const install = (Vue, vm) => {
|
|||||||
getRightsList,
|
getRightsList,
|
||||||
getRightsDetail,
|
getRightsDetail,
|
||||||
getEligibility,
|
getEligibility,
|
||||||
|
checkWinner,
|
||||||
getAppointmentList,
|
getAppointmentList,
|
||||||
getCheckList,
|
getCheckList,
|
||||||
doAppoint,
|
doAppoint,
|
||||||
|
|||||||
@@ -446,6 +446,35 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// xuchao: 认证前预检——证件号不在中奖名单就不发起人脸核验,避免白花实名认证费用
|
||||||
|
this.$u.api.checkWinner({
|
||||||
|
identityNo: (this.form.idNumber || '').trim()
|
||||||
|
}).then(res => {
|
||||||
|
if (res.errcode !== 0 || !res.data) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.errmsg || '查询中奖状态失败,请重试',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!res.data.isWinner) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '您暂未中奖,请中奖后再进入认证',
|
||||||
|
showCancel: false
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.startFaceVerify()
|
||||||
|
}).catch(() => {
|
||||||
|
// xuchao: 预检查询异常一律不放行进人脸,网络恢复后可重试
|
||||||
|
uni.showToast({
|
||||||
|
title: '查询中奖状态失败,请重试',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
startFaceVerify() {
|
||||||
uni.setStorageSync('authName', this.form.realName)
|
uni.setStorageSync('authName', this.form.realName)
|
||||||
uni.setStorageSync('authIdNo', this.form.idNumber)
|
uni.setStorageSync('authIdNo', this.form.idNumber)
|
||||||
// xuchao: 标记已发起认证流程,取消后停留在认证页,不自动恢复
|
// xuchao: 标记已发起认证流程,取消后停留在认证页,不自动恢复
|
||||||
|
|||||||
Reference in New Issue
Block a user