mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 16:02:26 +08:00
refactor
This commit is contained in:
15
dispatch/api/combo_token_req.go
Normal file
15
dispatch/api/combo_token_req.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package api
|
||||
|
||||
type ComboTokenReq struct {
|
||||
AppID int `json:"app_id"`
|
||||
ChannelID int `json:"channel_id"`
|
||||
Data string `json:"data"`
|
||||
Device string `json:"device"`
|
||||
Sign string `json:"sign"`
|
||||
}
|
||||
|
||||
type LoginTokenData struct {
|
||||
Uid string `json:"uid"`
|
||||
Token string `json:"token"`
|
||||
Guest bool `json:"guest"`
|
||||
}
|
||||
34
dispatch/api/combo_token_res.go
Normal file
34
dispatch/api/combo_token_res.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package api
|
||||
|
||||
type ComboTokenRes struct {
|
||||
Message string `json:"message"`
|
||||
Retcode int `json:"retcode"`
|
||||
Data LoginData `json:"data"`
|
||||
}
|
||||
|
||||
type LoginData struct {
|
||||
AccountType int `json:"account_type"`
|
||||
Heartbeat bool `json:"heartbeat"`
|
||||
ComboID string `json:"combo_id"`
|
||||
ComboToken string `json:"combo_token"`
|
||||
OpenID string `json:"open_id"`
|
||||
Data string `json:"data"`
|
||||
FatigueRemind any `json:"fatigue_remind"`
|
||||
}
|
||||
|
||||
func NewComboTokenRes() (r *ComboTokenRes) {
|
||||
r = &ComboTokenRes{
|
||||
Message: "",
|
||||
Retcode: 0,
|
||||
Data: LoginData{
|
||||
AccountType: 1,
|
||||
Heartbeat: false,
|
||||
ComboID: "",
|
||||
ComboToken: "",
|
||||
OpenID: "",
|
||||
Data: "{\"guest\":false}",
|
||||
FatigueRemind: nil,
|
||||
},
|
||||
}
|
||||
return r
|
||||
}
|
||||
7
dispatch/api/login_account_req.go
Normal file
7
dispatch/api/login_account_req.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package api
|
||||
|
||||
type LoginAccountRequestJson struct {
|
||||
Account string `json:"account"`
|
||||
Password string `json:"password"`
|
||||
IsCrypto bool `json:"is_crypto"`
|
||||
}
|
||||
74
dispatch/api/login_result.go
Normal file
74
dispatch/api/login_result.go
Normal file
@@ -0,0 +1,74 @@
|
||||
package api
|
||||
|
||||
type LoginResult struct {
|
||||
Message string `json:"message"`
|
||||
Retcode int `json:"retcode"`
|
||||
Data VerifyData `json:"data"`
|
||||
}
|
||||
|
||||
type VerifyData struct {
|
||||
Account VerifyAccountData `json:"account"`
|
||||
DeviceGrantRequired bool `json:"device_grant_required"`
|
||||
RealnameOperation string `json:"realname_operation"`
|
||||
RealpersonRequired bool `json:"realperson_required"`
|
||||
SafeMobileRequired bool `json:"safe_mobile_required"`
|
||||
}
|
||||
|
||||
type VerifyAccountData struct {
|
||||
Uid string `json:"uid"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
Mobile string `json:"mobile"`
|
||||
IsEmailVerify string `json:"is_email_verify"`
|
||||
Realname string `json:"realname"`
|
||||
IdentityCard string `json:"identity_card"`
|
||||
Token string `json:"token"`
|
||||
SafeMobile string `json:"safe_mobile"`
|
||||
FacebookName string `json:"facebook_name"`
|
||||
TwitterName string `json:"twitter_name"`
|
||||
GameCenterName string `json:"game_center_name"`
|
||||
GoogleName string `json:"google_name"`
|
||||
AppleName string `json:"apple_name"`
|
||||
SonyName string `json:"sony_name"`
|
||||
TapName string `json:"tap_name"`
|
||||
Country string `json:"country"`
|
||||
ReactivateTicket string `json:"reactivate_ticket"`
|
||||
AreaCode string `json:"area_code"`
|
||||
DeviceGrantTicket string `json:"device_grant_ticket"`
|
||||
}
|
||||
|
||||
func NewLoginResult() (r *LoginResult) {
|
||||
r = &LoginResult{
|
||||
Message: "",
|
||||
Retcode: 0,
|
||||
Data: VerifyData{
|
||||
Account: VerifyAccountData{
|
||||
Uid: "",
|
||||
Name: "",
|
||||
Email: "",
|
||||
Mobile: "",
|
||||
IsEmailVerify: "0",
|
||||
Realname: "",
|
||||
IdentityCard: "",
|
||||
Token: "",
|
||||
SafeMobile: "",
|
||||
FacebookName: "",
|
||||
TwitterName: "",
|
||||
GameCenterName: "",
|
||||
GoogleName: "",
|
||||
AppleName: "",
|
||||
SonyName: "",
|
||||
TapName: "",
|
||||
Country: "CN",
|
||||
ReactivateTicket: "",
|
||||
AreaCode: "**",
|
||||
DeviceGrantTicket: "",
|
||||
},
|
||||
DeviceGrantRequired: false,
|
||||
RealnameOperation: "None",
|
||||
RealpersonRequired: false,
|
||||
SafeMobileRequired: false,
|
||||
},
|
||||
}
|
||||
return r
|
||||
}
|
||||
6
dispatch/api/login_token_req.go
Normal file
6
dispatch/api/login_token_req.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package api
|
||||
|
||||
type LoginTokenRequest struct {
|
||||
Uid string `json:"uid"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
6
dispatch/api/region_rsp.go
Normal file
6
dispatch/api/region_rsp.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package api
|
||||
|
||||
type QueryCurRegionRspJson struct {
|
||||
Content string `json:"content"`
|
||||
Sign string `json:"sign"`
|
||||
}
|
||||
Reference in New Issue
Block a user