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