add 3 new api

This commit is contained in:
2025-03-12 22:35:46 +08:00
parent 42ea1bd929
commit ece4b5d1b1
6 changed files with 121 additions and 50 deletions

View File

@@ -1330,16 +1330,16 @@ func (l *QueryServiceLogic) VerifyCode(mobile string, code string) error {
// 二、三要素验证
func (l *QueryServiceLogic) Verify(Name string, IDCard string, Mobile string) error {
agent, ok := l.ctx.Value("agent").(bool)
if !ok {
agent = false
}
if !l.svcCtx.Config.SystemConfig.ThreeVerify || agent {
//agent, ok := l.ctx.Value("agent").(bool)
//if !ok {
// agent = false
//}
if !l.svcCtx.Config.SystemConfig.ThreeVerify {
twoVerification := service.TwoFactorVerificationRequest{
Name: Name,
IDCard: IDCard,
}
verification, err := l.svcCtx.VerificationService.TwoFactorVerification(twoVerification)
verification, err := l.svcCtx.VerificationService.TwoFactorVerificationWest(twoVerification)
if err != nil {
return errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "二要素验证失败: %v", err)
}