mirror of
https://github.com/PengZhangs2017582/novel.git
synced 2025-06-23 18:51:31 +08:00
initial commit
This commit is contained in:
26
api/backend/login.go
Normal file
26
api/backend/login.go
Normal file
@ -0,0 +1,26 @@
|
||||
package backend
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// verify code
|
||||
type GetCodeReq struct {
|
||||
g.Meta `path:"/get-code" method:"post" tags:"获取验证码" summary:"获取验证码"`
|
||||
Phone string `json:"phone" v:"required|phone" description:"手机号"`
|
||||
CodeType int `json:"codeType" v:"required|in:1,2#类型不合法" description:"验证码类型"`
|
||||
}
|
||||
type GetCodeRes struct {
|
||||
Code int
|
||||
}
|
||||
|
||||
// createOrLogin
|
||||
type CreateOrLoginReq struct {
|
||||
g.Meta `path:"/create-or-login" method:"post" tags:"注册或登录" summary:"注册或者登录"`
|
||||
Phone string `json:"phone" v:"required|phone" description:"手机号"`
|
||||
Code int `json:"code" v:"required|size:6" description:"验证码"`
|
||||
}
|
||||
|
||||
type CreateOrLoginRes struct {
|
||||
Id uint
|
||||
}
|
Reference in New Issue
Block a user