From 2a0f0c46caa9700f9c55367f610f240d08edaa66 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Sun, 27 Apr 2025 18:44:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A6=96=E6=AC=A1=E5=BC=95=E5=AF=BCtoka?= =?UTF-8?q?n=E6=9C=AA=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/auth/controller/bootloader.go | 4 ++++ 1 file changed, 4 insertions(+) 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)