Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
f56cdad6d0 |
@ -25,7 +25,10 @@ func TestGetUserRoleList(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
req := CreateGetUserRoleListRequest(63610626, 2850)
|
// 不限定角色
|
||||||
|
//req := CreateGetUserRoleListRequest(221016372, 7874, 0, "")
|
||||||
|
// 限定角色
|
||||||
|
req := CreateGetUserRoleListRequest(221016372, 7874, 265500390, "勇闯关东")
|
||||||
resp, err := client.GetUserRoleList(req)
|
resp, err := client.GetUserRoleList(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
|
@ -85,7 +85,7 @@ func GetSign() (ts int64, sign string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CreateGetUserRoleListRequest 获取玩家角色列表
|
// CreateGetUserRoleListRequest 获取玩家角色列表
|
||||||
func CreateGetUserRoleListRequest(uid int, gameId int) (req *GetUserRoleListRequest) {
|
func CreateGetUserRoleListRequest(uid int, gameId int, roleId int, roleServer string) (req *GetUserRoleListRequest) {
|
||||||
ts, sign := GetSign()
|
ts, sign := GetSign()
|
||||||
|
|
||||||
req = &GetUserRoleListRequest{
|
req = &GetUserRoleListRequest{
|
||||||
@ -93,13 +93,15 @@ func CreateGetUserRoleListRequest(uid int, gameId int) (req *GetUserRoleListRequ
|
|||||||
}
|
}
|
||||||
req.InitWithApiInfo(HOST, VERSION, "/remote_login.php")
|
req.InitWithApiInfo(HOST, VERSION, "/remote_login.php")
|
||||||
req.FormParams = map[string]string{
|
req.FormParams = map[string]string{
|
||||||
"act": "info",
|
"act": "info",
|
||||||
"do": "user_role",
|
"do": "user_role",
|
||||||
"method": "get",
|
"method": "get",
|
||||||
"uid": fmt.Sprintf("%d", uid),
|
"uid": fmt.Sprintf("%d", uid),
|
||||||
"game_id": fmt.Sprintf("%d", gameId),
|
"game_id": fmt.Sprintf("%d", gameId),
|
||||||
"time": fmt.Sprintf("%v", ts),
|
"role_id": fmt.Sprintf("%d", roleId),
|
||||||
"sign": sign,
|
"role_server": roleServer,
|
||||||
|
"time": fmt.Sprintf("%v", ts),
|
||||||
|
"sign": sign,
|
||||||
}
|
}
|
||||||
|
|
||||||
req.Method = requests.POST
|
req.Method = requests.POST
|
||||||
|
Loading…
Reference in New Issue
Block a user