feat: 认证页发起人脸前先查中奖预检,未中奖提示「您暂未中奖,请中奖后再进入认证」,避免过度消耗实名认证费用(需先发布后端 checkWinner 接口)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-10-19 12:21:38 +08:00
co-authored by Claude Fable 5
parent f6c282237d
commit 8ec4ef304f
2 changed files with 34 additions and 0 deletions
+29
View File
@@ -446,6 +446,35 @@
})
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('authIdNo', this.form.idNumber)
// xuchao: 标记已发起认证流程,取消后停留在认证页,不自动恢复