:refactor: 更新二维码刷新链接,添加IsAwaken标志以支持唤醒登录状态
All checks were successful
BuildImage / build-image (push) Successful in 3m43s

This commit is contained in:
李寻欢 2025-04-24 16:33:33 +08:00
parent de3c7bcd2c
commit 06c1cd91f3
2 changed files with 6 additions and 5 deletions

View File

@ -262,10 +262,11 @@ func RobotLogin(c *fiber.Ctx) error {
awakenResp, err := robotCli.Login.AwakenLogin() awakenResp, err := robotCli.Login.AwakenLogin()
if err != nil { if err != nil {
return c.Render("robot/login", fiber.Map{ return c.Render("robot/login", fiber.Map{
"Title": "微信登录", "Title": "微信登录",
"Robot": robot, "Robot": robot,
"Message": "唤醒登录失败: " + err.Error(), "Message": "唤醒登录失败: " + err.Error(),
"IsError": true, "IsError": true,
"IsAwaken": true,
}) })
} }

View File

@ -119,7 +119,7 @@
<a href="/admin/robots/{{.Robot.ID}}" class="py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors"> <a href="/admin/robots/{{.Robot.ID}}" class="py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition-colors">
取消 取消
</a> </a>
<a href="/admin/robots/{{.Robot.ID}}/login" id="refresh-qrcode" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-gray-800 hover:bg-gray-700 transition-colors hidden"> <a href="/admin/robots/{{.Robot.ID}}/login?qrcode=1" id="refresh-qrcode" class="py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-gray-800 hover:bg-gray-700 transition-colors hidden">
刷新二维码 刷新二维码
</a> </a>
</div> </div>