diff --git a/apis/system/index.go b/apis/system/index.go new file mode 100644 index 00000000..31c0134b --- /dev/null +++ b/apis/system/index.go @@ -0,0 +1,42 @@ +package system + +import( + "github.com/gin-gonic/gin" +) + +const INDEX = ` + + + + +GO-ADMIN欢迎您 + + + + + + + + +` + + +func HelloWorld(c *gin.Context){ + c.Header("Content-Type", "text/html; charset=utf-8") + c.String(200, INDEX) + + +} diff --git a/router/router.go b/router/router.go index 7a3ae830..af404731 100644 --- a/router/router.go +++ b/router/router.go @@ -28,7 +28,7 @@ func InitRouter() *gin.Engine { r.Use(middleware.RequestId()) r.Use(middleware.DemoEvn()) - r.GET("/", handler.HelloGoAdmin) + r.GET("/", system.HelloWorld) r.Static("/static", "./static") r.GET("/info", handler.Ping)