diff --git a/controller/index.go b/controller/index.go index 406314b..5733603 100644 --- a/controller/index.go +++ b/controller/index.go @@ -6,7 +6,7 @@ import ( "net/http" ) func Index(c *gin.Context) { - c.Redirect(302,"/main") + c.Redirect(302,"/index") } //首页跳转 func ActionIndex(w http.ResponseWriter, r *http.Request) { diff --git a/main.go b/main.go index b88e970..ba8f55a 100644 --- a/main.go +++ b/main.go @@ -30,6 +30,7 @@ func main() { engine.Static("/static", "./static") //首页 engine.GET("/", controller.Index) + engine.GET("/index", tmpl.PageIndex) //登陆界面 engine.GET("/login", tmpl.PageLogin) //咨询界面 diff --git a/static/html/intro.html b/static/html/index.html similarity index 67% rename from static/html/intro.html rename to static/html/index.html index ffa0658..e77ac26 100644 --- a/static/html/intro.html +++ b/static/html/index.html @@ -6,9 +6,6 @@