新增一个简单的好友列表页面

This commit is contained in:
李寻欢
2023-11-30 11:37:02 +08:00
parent 6626f45af2
commit 6a259b0552
17 changed files with 523 additions and 40 deletions

21
router/router.go Normal file
View File

@@ -0,0 +1,21 @@
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)
})
}