parent
6539ae20fa
commit
6ba4d1ae82
@ -1,7 +1,22 @@
|
|||||||
package service
|
package service
|
||||||
|
|
||||||
|
import (
|
||||||
|
"Cloudreve/serializer"
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
)
|
||||||
|
|
||||||
// UserLoginService 管理用户登录的服务
|
// UserLoginService 管理用户登录的服务
|
||||||
type UserLoginService struct {
|
type UserLoginService struct {
|
||||||
UserName string `form:"user_name" json:"user_name" binding:"required,min=5,max=30"`
|
//TODO 细致调整验证规则
|
||||||
Password string `form:"password" json:"password" binding:"required,min=8,max=40"`
|
UserName string `form:"userName" json:"userName" binding:"required,min=5,max=30"`
|
||||||
|
Password string `form:"Password" json:"Password" binding:"required,min=8,max=40"`
|
||||||
|
CaptchaCode string `form:"captchaCode" json:"captchaCode"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Login 用户登录函数
|
||||||
|
func (service *UserLoginService) Login(c *gin.Context) serializer.Response {
|
||||||
|
return serializer.Response{
|
||||||
|
Code: 0,
|
||||||
|
Msg: "OK",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue