From d2a3d601839fa53bc2808502db315ac81625026f Mon Sep 17 00:00:00 2001 From: yanweidong Date: Sun, 4 Jan 2026 18:06:23 +0800 Subject: [PATCH] dev --- cmd/main/main.go | 3 +- internal/impl/impl.go | 6 +- res/templates/index.html | 1682 ++++---------------------------------- 3 files changed, 160 insertions(+), 1531 deletions(-) diff --git a/cmd/main/main.go b/cmd/main/main.go index 7d39d2a..4faed88 100644 --- a/cmd/main/main.go +++ b/cmd/main/main.go @@ -23,6 +23,7 @@ func main() { // 初始化Gin引擎 app := gin.Default() + tmpl.New(app) // 创建并加载自定义渲染器 middleware.Mode(app) @@ -36,8 +37,6 @@ func main() { routers.RegistersPublic(app) routers.RegistersAll(app) - tmpl.New(app) - // start err := app.Run(fmt.Sprintf(":%s", config.Spec.Port)) if err != nil { diff --git a/internal/impl/impl.go b/internal/impl/impl.go index 5e0297a..bd8a7a8 100644 --- a/internal/impl/impl.go +++ b/internal/impl/impl.go @@ -4,8 +4,6 @@ import ( "time" "git.apinb.com/bsm-sdk/core/cache/redis" - "git.apinb.com/bsm-sdk/core/with" - "git.apinb.com/senlinai/site/internal/config" cache "github.com/patrickmn/go-cache" "gorm.io/gorm" ) @@ -19,6 +17,6 @@ var ( func NewImpl() { // with activating MemoryService = cache.New(5*time.Minute, 10*time.Minute) - RedisService = with.RedisCache(config.Spec.Cache) // redis cache - DBService = with.Databases(config.Spec.Databases, nil) // model + //RedisService = with.RedisCache(config.Spec.Cache) // redis cache + //DBService = with.Databases(config.Spec.Databases, nil) // model } diff --git a/res/templates/index.html b/res/templates/index.html index f40bf00..bcfee55 100644 --- a/res/templates/index.html +++ b/res/templates/index.html @@ -1,57 +1,36 @@ {{template "components/header.html" .}} {{template "components/preloader.html" .}} - - - - - - - -
-