1
0
forked from lxh/go-wxhelper
go-wxhelper/router/router.go

22 lines
387 B
Go
Raw Permalink Normal View History

package router
import (
"github.com/gin-gonic/gin"
"go-wechat/app"
)
// Init
// @description: 初始化路由
// @param g
func Init(g *gin.Engine) {
g.GET("/", func(ctx *gin.Context) {
// 重定向到index.html
ctx.Redirect(302, "/index.html")
})
g.GET("/index.html", app.Index) // 首页
g.GET("/test.html", func(ctx *gin.Context) {
ctx.HTML(200, "test.html", nil)
})
}