feat: 添加实时锁定状态控制解锁按钮显示

添加实时锁定状态字段到登录失败日志模型
并修改解锁按钮仅在账户当前仍锁定时显示
This commit is contained in:
Austin
2026-09-23 13:18:35 +08:00
parent 6c338626d6
commit 5a07f63716
2 changed files with 3 additions and 1 deletions
@@ -100,6 +100,7 @@ type ImLoginFailureLogModel struct {
UserAgent string `json:"userAgent" dc:"客户端标识"`
RiskLevel string `json:"riskLevel" dc:"风险等级"`
RiskAction string `json:"riskAction" dc:"风控动作"`
LockedNow bool `json:"lockedNow" dc:"当前是否仍处于锁定中(实时状态,非历史快照)"`
RequestId string `json:"requestId" dc:"请求ID"`
AttemptAt *gtime.Time `json:"attemptAt" dc:"尝试时间"`
Metadata string `json:"metadata" dc:"元数据"`
+2 -1
View File
@@ -123,7 +123,8 @@
label: '解锁',
type: 'primary',
auth: ['/imLoginFailureLog/unlock'],
ifShow: () => record.riskAction === 'account_locked' && !!record.accountHash,
// 仅当前仍锁定中(服务端实时状态)才显示;解锁成功刷新后按钮消失
ifShow: () => record.riskAction === 'account_locked' && !!record.accountHash && !!record.lockedNow,
onClick: () => unlockLockout(record),
},
],