修复统计数据和密码登录逻辑

This commit is contained in:
2025-07-01 18:23:15 +08:00
parent 822ba3d02a
commit f50d5bba6f
6 changed files with 69 additions and 29 deletions

View File

@@ -7,6 +7,7 @@ import (
"platform/pkg/env"
"platform/pkg/u"
"platform/web/auth"
"platform/web/core"
g "platform/web/globals"
m "platform/web/models"
q "platform/web/queries"
@@ -74,6 +75,15 @@ func Identify(c *fiber.Ctx) error {
return err
}
if resp.Error.Code != 0 {
var msg string
switch resp.Error.Code {
case 1007:
msg = "身份证号码格式错误"
}
return core.NewBizErr(fmt.Sprintf("活体认证失败: %s", msg))
}
// 保存认证中间状态
info := idenInfo{
Uid: authCtx.Payload.Id,