李寻欢 6f766c957d
Some checks failed
BuildImage / build-image (push) Has been cancelled
🆕 登录新增Logto兼容
2025-04-22 17:05:51 +08:00

22 lines
444 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package handler
import (
"github.com/gofiber/fiber/v2"
)
// ErrorPage 显示错误页面
func ErrorPage(c *fiber.Ctx) error {
// 获取错误消息
errorMsg := c.Query("error")
if errorMsg == "" {
errorMsg = "未知错误"
}
// 设置 NoLayout 为 true使用独立布局不显示主应用的导航组件
return c.Render("error", fiber.Map{
"Title": "错误",
"ErrorMessage": errorMsg,
"NoLayout": true,
})
}