|
- package router
-
- import (
- "applet/app/bigData/hdl"
- "applet/app/bigData/mw"
- "github.com/gin-gonic/gin"
- )
-
- func BigDataInit(r *gin.RouterGroup) {
- r.POST("/test", hdl.Demo)
- r.POST("/login", hdl.Login)
- r.Use(mw.Auth) //检测登录状态
- r.GET("/userInfo", hdl.UserInfo)
-
- rData(r.Group("data")) //数据接口
- }
-
- func rData(r *gin.RouterGroup) {
- r.GET("/leftData", hdl.LeftData) //左侧数据
- r.POST("/rightData", hdl.RightData) //右侧数据
- }
|