@@ -47,52 +47,52 @@ type LoginRespData struct {
47
47
}
48
48
49
49
type LoginUserData struct {
50
- ID string `json:"id"`
51
- Company string `json:"company"`
52
- Type string `json:"type"`
53
- Dept string `json:"dept"`
54
- Account string `json:"account"`
55
- Role string `json:"role"`
56
- Realname string `json:"realname"`
57
- Pinyin string `json:"pinyin"`
58
- Nickname string `json:"nickname"`
59
- Commiter string `json:"commiter"`
60
- Avatar string `json:"avatar"`
61
- Birthday string `json:"birthday"`
62
- Gender string `json:"gender"`
63
- Email string `json:"email"`
64
- Skype string `json:"skype"`
65
- Qq string `json:"qq"`
66
- Mobile string `json:"mobile"`
67
- Phone string `json:"phone"`
68
- Weixin string `json:"weixin"`
69
- Dingding string `json:"dingding"`
70
- Slack string `json:"slack"`
71
- Whatsapp string `json:"whatsapp"`
72
- Address string `json:"address"`
73
- Zipcode string `json:"zipcode"`
74
- Nature string `json:"nature"`
75
- Analysis string `json:"analysis"`
76
- Strategy string `json:"strategy"`
77
- Join string `json:"join"`
78
- Visits string `json:"visits"`
79
- Visions string `json:"visions"`
80
- IP string `json:"ip"`
81
- Last string `json:"last"`
82
- Fails string `json:"fails"`
83
- Locked string `json:"locked"`
84
- Feedback string `json:"feedback"`
85
- Ranzhi string `json:"ranzhi"`
86
- Ldap string `json:"ldap"`
87
- Score string `json:"score"`
88
- ScoreLevel string `json:"scoreLevel"`
89
- ResetToken string `json:"resetToken"`
90
- ClientStatus string `json:"clientStatus"`
91
- ClientLang string `json:"clientLang"`
92
- LastTime string `json:"lastTime"`
93
- Admin bool `json:"admin"`
94
- ModifyPassword bool `json:"modifyPassword"`
95
- Rights LoginUserRights `json:"rights"`
50
+ ID int `json:"id"`
51
+ Company string `json:"company"`
52
+ Type string `json:"type"`
53
+ Dept int `json:"dept"`
54
+ Account string `json:"account"`
55
+ Role string `json:"role"`
56
+ Realname string `json:"realname"`
57
+ Pinyin string `json:"pinyin"`
58
+ Nickname string `json:"nickname"`
59
+ Commiter string `json:"commiter"`
60
+ Avatar string `json:"avatar"`
61
+ Birthday string `json:"birthday"`
62
+ Gender string `json:"gender"`
63
+ Email string `json:"email"`
64
+ Skype string `json:"skype"`
65
+ Qq string `json:"qq"`
66
+ Mobile string `json:"mobile"`
67
+ Phone string `json:"phone"`
68
+ Weixin string `json:"weixin"`
69
+ Dingding string `json:"dingding"`
70
+ Slack string `json:"slack"`
71
+ Whatsapp string `json:"whatsapp"`
72
+ Address string `json:"address"`
73
+ Zipcode string `json:"zipcode"`
74
+ Nature string `json:"nature"`
75
+ Analysis string `json:"analysis"`
76
+ Strategy string `json:"strategy"`
77
+ Join string `json:"join"`
78
+ Visits int `json:"visits"`
79
+ Visions string `json:"visions"`
80
+ IP string `json:"ip"`
81
+ Last string `json:"last"`
82
+ Fails int `json:"fails"`
83
+ Locked string `json:"locked"`
84
+ Feedback string `json:"feedback"`
85
+ Ranzhi string `json:"ranzhi"`
86
+ Ldap string `json:"ldap"`
87
+ Score int `json:"score"`
88
+ ScoreLevel int `json:"scoreLevel"`
89
+ ResetToken string `json:"resetToken"`
90
+ ClientStatus string `json:"clientStatus"`
91
+ ClientLang string `json:"clientLang"`
92
+ LastTime int `json:"lastTime"`
93
+ Admin bool `json:"admin"`
94
+ ModifyPassword bool `json:"modifyPassword"`
95
+ Rights interface {} `json:"rights"`
96
96
Groups struct {
97
97
Num13 string `json:"13"`
98
98
} `json:"groups"`
@@ -195,7 +195,12 @@ func (s *LoginService) Login() (bool, *LoginRespData, *req.Response, error) {
195
195
} else {
196
196
resp , err = s .client .client .R ().
197
197
SetSuccessResult (& data ).
198
- Get (s .client .RequestURLFmt ("/user-login.json?account=%s&password=%s&zentaosid=%s" , s .client .username , s .client .password , s .client .zentaosid ))
198
+ SetQueryParams (map [string ]string {
199
+ "account" : s .client .username ,
200
+ "password" : s .client .password ,
201
+ "zentaosid" : s .client .zentaosid ,
202
+ }).
203
+ Get (s .client .RequestURL ("/user-login.json" ))
199
204
}
200
205
if err != nil {
201
206
return false , & data , resp , err
0 commit comments