ecs/platform/taptap/define.go

47 lines
1.6 KiB
Go
Raw Normal View History

2025-06-04 18:17:39 +08:00
package taptap
const (
clientId = "uh1cdb7qgupjry5x5z"
apiProtocol = "https"
apiHost = "open.tapapis.cn"
apiAccountProfile = "/account/profile/v1"
quickProductCode = "49050850310218458466757744267891"
quickCallbackKey = "80798392594688273830418961539557"
quickMd5Key = "63646572529301139443533249534111"
)
func QuickCallbackKey() string {
return quickCallbackKey
}
func QuickMd5Key() string {
return quickMd5Key
}
type ErrorData struct {
Code int `json:"code,omitempty"` //预留字段,用于以后追踪问题
Msg string `json:"msg,omitempty"` //消息
Error string `json:"error,omitempty"` //错误码,代码逻辑判断时使用
Desc string `json:"error_description,omitempty"` //错误描述信息,开发的时候用来帮助理解和解决发生的错误
}
type AccountProfileData struct {
Gender string `json:"gender,omitempty"` //不知道干嘛的
Name string `json:"name,omitempty"` //用户名
Avatar string `json:"avatar,omitempty"` //用户头像图片地址
Openid string `json:"openid,omitempty"` //授权用户唯一标识,每个玩家在每个游戏中的 openid 都是不一样的,同一游戏获取同一玩家的 openid 总是相同
Unionid string `json:"unionid,omitempty"` //授权用户唯一标识,一个玩家在一个厂商的所有游戏中 unionid 都是一样的,不同厂商 unionid 不同
}
type Data struct {
ErrorData
AccountProfileData
}
type MsgTapTapAck struct {
Success bool `json:"success"`
Now int64 `json:"now"`
Data Data `json:"data"`
}