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