优化响应中间件,自动识别响应数据格式

This commit is contained in:
孟帅
2023-06-16 19:58:29 +08:00
parent 50e64e132f
commit 9b89402bf6
13 changed files with 112 additions and 128 deletions

View File

@@ -16,10 +16,9 @@ import (
// Home 前台页面路由
func Home(ctx context.Context, group *ghttp.RouterGroup) {
// 允许通过根地址访问的路由可以同时加到这里
// 访问地址http://127.0.0.1:8000
group.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(service.Middleware().HomeAuth)
// 允许通过根地址访问的路由可以加到这里访问地址http://127.0.0.1:8000
group.Bind(
base.Site, // 基础
)