hcmp/route/url.go
2024-07-31 15:47:50 +08:00

52 lines
1.5 KiB
Go

package route
import (
"hc/weapp"
"github.com/gin-gonic/gin"
)
func Route(r *gin.Engine) {
/*
r.POST("/wxlogin", WxLogin) // 小程序登录
r.POST("/getUser", GetUserInfo)
r.POST("/updateUser", UpdateUser)
r.POST("/unlinkdev", weapp.UnlinkDev)
r.POST("/binddev", weapp.BindDev)
r.POST("/devlist", weapp.DevList)
r.POST("/getPlan", weapp.PlanList)
r.POST("/trainHistory", weapp.TrainHistory)
r.POST("/updatePlan", weapp.UpdatePlan)
r.POST("/trainResult", weapp.TrainResult)
r.POST("/actionList", weapp.ActionList)
r.POST("/actionDetail", weapp.ActionDetail)
*/
r.POST("/wxlogin", WxLogin) // 小程序登录
r.POST("/opt", weapp.Opt) // 数据库操作
r.POST("/anayResult", weapp.AnalyseResult)
r.POST("notify", weapp.ReportNotify)
// 鉴权接口
r.Use(TokenAuth())
{
// user
r.POST("/modifyPwd", ModifyPasswd)
r.POST("/freshToken", FreshToken)
r.POST("/wxlogout", WxLogout) // 维护小程序退出登录
r.POST("/getUser", GetUserInfo)
r.POST("/updateUser", UpdateUser)
r.POST("/unlinkdev", weapp.UnlinkDev)
r.POST("/binddev", weapp.BindDev)
r.POST("/devlist", weapp.DevList)
r.POST("/getPlan", weapp.PlanList)
r.POST("/trainHistory", weapp.TrainHistory)
r.POST("/updatePlan", weapp.UpdatePlan)
r.POST("/trainResult", weapp.TrainResult)
r.POST("/actionList", weapp.ActionList)
r.POST("/actionDetail", weapp.ActionDetail)
r.POST("/createTrain", weapp.CreateTrain)
r.POST("/uploadAction", weapp.UploadAction)
}
}