This commit is contained in:
2025-04-01 14:13:41 +08:00
parent d7183fcc00
commit 7857015405
97 changed files with 1917 additions and 6934 deletions

View File

@@ -1,5 +1,10 @@
package know
import (
"context"
"fmt"
)
const (
CustomerCategory = "customer_category"
CustomerSource = "customer_source"
@@ -43,3 +48,8 @@ var (
// 所有角色
AllRoles = "m:role:all"
)
func GetManageKey(ctx context.Context, key string, arg ...any) string {
key = fmt.Sprintf(key, arg...)
return key
}

View File

@@ -0,0 +1,75 @@
package pearadmin
import "management/internal/db/model/dto"
const PearKey = "PEAR_JSON"
var PearJson = &dto.PearConfig{
Logo: dto.Logo{
Title: "Pear Admin",
Image: "/statics/admin/images/logo.png",
},
Menu: dto.Menu{
Data: "/system/menus",
Method: "GET",
Accordion: false,
Collapse: false,
Control: true,
Select: "10",
Async: true,
},
Tab: dto.Tab{
Enable: true,
KeepState: true,
Session: true,
Preload: false,
Max: "30",
Index: dto.Index{
Id: "10",
Href: "",
Title: "首页",
},
},
Theme: dto.Theme{
DefaultColor: "1",
DefaultMenu: "dark-theme",
DefaultHeader: "light-theme",
AllowCustom: true,
Banner: false,
},
Colors: []dto.Colors{
{
Id: "1",
Color: "#2d8cf0",
Second: "#ecf5ff",
},
{
Id: "2",
Color: "#36b368",
Second: "#f0f9eb",
},
{
Id: "3",
Color: "#f6ad55",
Second: "#fdf6ec",
},
{
Id: "4",
Color: "#f56c6c",
Second: "#fef0f0",
},
{
Id: "5",
Color: "#3963bc",
Second: "#ecf5ff",
},
},
Other: dto.Other{
KeepLoad: "200",
AutoHead: false,
Footer: false,
},
Header: dto.Header{
Message: "/statics/admin/data/message.json",
},
}