...
|
...
|
@@ -26,8 +26,7 @@ func RequestUCenterLogin(account, password string) (*ResponseLogin, error) { |
|
|
log.Error("解析统一用户中心响应失败 err:%s", err)
|
|
|
return nil, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
if !(uclientReturn.Code == ResponseCode0 &&
|
|
|
uclientReturn.Msg == ResponseMsgOk) {
|
|
|
if !(uclientReturn.Code == ResponseCode0) {
|
|
|
return nil, protocol.NewErrWithMessage("10052")
|
|
|
}
|
|
|
return uclientReturn, nil
|
...
|
...
|
@@ -58,8 +57,7 @@ func RequestUCenterAddUser(phone string, nickname string, avatar string) (*Respo |
|
|
log.Error("解析统一用户中心响应失败 err:%s", err)
|
|
|
return nil, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
if !(ucenterReturn.Code == ResponseCode0 &&
|
|
|
ucenterReturn.Msg == ResponseMsgOk) {
|
|
|
if !(ucenterReturn.Code == ResponseCode0) {
|
|
|
return nil, protocol.NewErrWithMessage("10052")
|
|
|
}
|
|
|
return ucenterReturn, nil
|
...
|
...
|
@@ -85,8 +83,7 @@ func RequestUCenterSmsCode(phone string) error { |
|
|
log.Error("解析统一用户中心响应失败 err:%s", err)
|
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
if !(ucenterReturn.Code == ResponseCode0 &&
|
|
|
ucenterReturn.Msg == ResponseMsgOk) {
|
|
|
if !(ucenterReturn.Code == ResponseCode0) {
|
|
|
return protocol.NewErrWithMessage("10052")
|
|
|
}
|
|
|
return nil
|
...
|
...
|
@@ -105,17 +102,16 @@ func RequestUCenterLoginSms(phone string, captcha string) (*ResponseLoginSms, er |
|
|
log.Error("统一用户中心请求失败 err:%s", err)
|
|
|
return nil, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
var ucenterReturn *ResponseLoginSms
|
|
|
err = json.Unmarshal(btBody, ucenterReturn)
|
|
|
var ucenterReturn ResponseLoginSms
|
|
|
err = json.Unmarshal(btBody, &ucenterReturn)
|
|
|
if err != nil {
|
|
|
log.Error("解析统一用户中心响应失败 err:%s", err)
|
|
|
return nil, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
if !(ucenterReturn.Code == ResponseCode0 &&
|
|
|
ucenterReturn.Msg == ResponseMsgOk) {
|
|
|
if !(ucenterReturn.Code == ResponseCode0) {
|
|
|
return nil, protocol.NewErrWithMessage("10052")
|
|
|
}
|
|
|
return ucenterReturn, nil
|
|
|
return &ucenterReturn, nil
|
|
|
}
|
|
|
|
|
|
func RequestUCenterSmsCodeCheck(phone string, captcha string) (*ResponseSmsCodeCheck, error) {
|
...
|
...
|
@@ -135,8 +131,7 @@ func RequestUCenterSmsCodeCheck(phone string, captcha string) (*ResponseSmsCodeC |
|
|
log.Error("解析统一用户中心响应失败 err:%s", err)
|
|
|
return nil, protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
if !(ucenterReturn.Code == ResponseCode0 &&
|
|
|
ucenterReturn.Msg == ResponseMsgOk) {
|
|
|
if !(ucenterReturn.Code == ResponseCode0) {
|
|
|
return nil, protocol.NewErrWithMessage("10026")
|
|
|
}
|
|
|
return ucenterReturn, nil
|
...
|
...
|
@@ -161,8 +156,7 @@ func RequestUCenterRestPassword(phone, newPwd, confirmPwd, certificate string) e |
|
|
log.Error("解析统一用户中心响应失败 err:%s", err)
|
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
if !(ucenterReturn.Code == ResponseCode0 &&
|
|
|
ucenterReturn.Msg == ResponseMsgOk) {
|
|
|
if !(ucenterReturn.Code == ResponseCode0) {
|
|
|
return protocol.NewErrWithMessage("10052")
|
|
|
}
|
|
|
|
...
|
...
|
|