diff --git a/src/modules/auth/controller/bootloader.go b/src/modules/auth/controller/bootloader.go index 99b04cec..74b0e3cc 100644 --- a/src/modules/auth/controller/bootloader.go +++ b/src/modules/auth/controller/bootloader.go @@ -59,6 +59,8 @@ func (s *BootloaderController) Start(c *gin.Context) { } // 当前请求信息 + ipaddr, location := reqctx.IPAddrLocation(c) + os, browser := reqctx.UaOsBrowser(c) deviceFingerprint := reqctx.DeviceFingerprint(c, info.UserId) // 生成访问令牌 @@ -67,6 +69,8 @@ func (s *BootloaderController) Start(c *gin.Context) { c.JSON(200, resp.ErrMsg("token generation failed")) return } + // 记录令牌,创建系统访问记录 + token.UserInfoCreate(&info, deviceFingerprint, [4]string{ipaddr, location, os, browser}) // 创建系统访问记录 s.accountService.UpdateLoginDateAndIP(info)