mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 06:56:10 +08:00
优化home模块页面错误处理
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/gogf/gf/v2/encoding/gbase64"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/gogf/gf/v2/os/grpool"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
@@ -46,6 +47,11 @@ func FilterMaskDemo(ctx context.Context, src g.Map) g.Map {
|
||||
return src
|
||||
}
|
||||
|
||||
// DefaultErrorTplContent 获取默认的错误模板内容
|
||||
func DefaultErrorTplContent(ctx context.Context) string {
|
||||
return gfile.GetContents(g.Cfg().MustGet(ctx, "viewer.paths").String() + "/error/default.html")
|
||||
}
|
||||
|
||||
// DecryptText 解密文本
|
||||
func DecryptText(text string) (string, error) {
|
||||
str, err := gbase64.Decode([]byte(text))
|
||||
|
Reference in New Issue
Block a user