first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type AuthRouter struct {
|
||||
}
|
||||
|
||||
// InitAuthRouter 初始化登录路由
|
||||
func (s *AuthRouter) InitAuthRouter(Router *gin.RouterGroup) {
|
||||
loginRouter := Router.Group("auth")
|
||||
{
|
||||
loginRouter.POST("login", authApi.Login)
|
||||
loginRouter.GET("captcha", authApi.Captcha)
|
||||
loginRouter.GET("logout", authApi.Logout) // 服务端不保存任何登录状态 退出实际是禁用了当前的jwt
|
||||
loginRouter.GET("miniLogin", authApi.MiniLogin) //小程序登录
|
||||
loginRouter.GET("getPhone", authApi.GetPhone) // 获取手机号
|
||||
loginRouter.GET("getLocation", authApi.GetLocation) // 获取位置
|
||||
loginRouter.GET("getWeather", authApi.GetWeather) // 获取天气
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user