增加性接口,修复登录错误
此提交包含在:
@@ -23,7 +23,7 @@ func SDULogin(username string, password string) (*dto.SDULoginData, error) {
|
||||
}
|
||||
result1 := string(resp.Body())
|
||||
if resp.StatusCode()/100 != 2 {
|
||||
return nil, errors.New(result1)
|
||||
return nil, errors.New("账号或密码错误")
|
||||
}
|
||||
resp, err = Client.R().SetBody("service=https://service.sdu.edu.cn/tp_up/view?m=up").
|
||||
Post("https://pass.sdu.edu.cn/cas/restlet/tickets/" + result1)
|
||||
|
新增問題並參考
封鎖使用者