47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
|
|
package passport
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||
|
|
)
|
||
|
|
|
||
|
|
type GetUserRegInfoRequest struct {
|
||
|
|
*requests.RpcRequest
|
||
|
|
}
|
||
|
|
|
||
|
|
type GetUserRegInfoResponse struct {
|
||
|
|
*responses.BaseResponse
|
||
|
|
Code int `json:"code"`
|
||
|
|
Msg string `json:"msg"`
|
||
|
|
Data struct {
|
||
|
|
RegTime int64 `json:"reg_time"`
|
||
|
|
GameId int64 `json:"game_id"`
|
||
|
|
} `json:"data"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// CreateGetUserRegInfoRequest 获取用户注册信息
|
||
|
|
func CreateGetUserRegInfoRequest(userName string) (req *GetUserRegInfoRequest) {
|
||
|
|
ts, sign := GetSign()
|
||
|
|
req = &GetUserRegInfoRequest{
|
||
|
|
RpcRequest: &requests.RpcRequest{},
|
||
|
|
}
|
||
|
|
req.InitWithApiInfo(HOST, VERSION, "/remote_login.php")
|
||
|
|
req.FormParams = map[string]string{
|
||
|
|
"act": "info",
|
||
|
|
"do": "get_user_reg_info",
|
||
|
|
"user_name": userName,
|
||
|
|
"time": fmt.Sprintf("%v", ts),
|
||
|
|
"sign": sign,
|
||
|
|
}
|
||
|
|
req.Method = requests.POST
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
func CreateGetUserRegInfoResponse() (response *GetUserRegInfoResponse) {
|
||
|
|
response = &GetUserRegInfoResponse{
|
||
|
|
BaseResponse: &responses.BaseResponse{},
|
||
|
|
}
|
||
|
|
return
|
||
|
|
}
|