This commit is contained in:
2025-12-09 18:55:28 +08:00
parent 8d00d67540
commit c23ab8338b
209 changed files with 5445 additions and 3963 deletions

View File

@@ -9,10 +9,10 @@ info (
//============================> user v1 <============================
// 用户基本类型定义
type User {
Id int64 `json:"id"`
Mobile string `json:"mobile"`
NickName string `json:"nickName"`
UserType int64 `json:"userType"`
Id string `json:"id"`
Mobile string `json:"mobile"`
NickName string `json:"nickName"`
UserType int64 `json:"userType"`
}
//no need login
@@ -21,6 +21,9 @@ type User {
group: user
)
service main {
@doc "unified auth"
@handler auth
post /user/auth (AuthReq) returns (AuthResp)
@doc "mobile code login"
@handler mobileCodeLogin
post /user/mobileCodeLogin (MobileCodeLoginReq) returns (MobileCodeLoginResp)
@@ -38,6 +41,18 @@ service main {
}
type (
AuthReq {
Platform string `json:"platform"` // browser|wxh5|wxmini
Code string `json:"code,optional"`
}
AuthResp {
AccessToken string `json:"accessToken"`
AccessExpire int64 `json:"accessExpire"`
RefreshAfter int64 `json:"refreshAfter"`
UserType int64 `json:"userType"`
HasMobile bool `json:"hasMobile"`
IsAgent bool `json:"isAgent"`
}
MobileCodeLoginReq {
Mobile string `json:"mobile"`
Code string `json:"code" validate:"required"`