作者 yangfu

fix auth.login

1 package protocol 1 package protocol
2 2
3 var errmessge ErrorMap = map[int]string{ 3 var errmessge ErrorMap = map[int]string{
4 - 0: "", 4 + 0: "成功",
5 1: "系统异常", 5 1: "系统异常",
6 2: "参数错误", 6 2: "参数错误",
7 101: "clientId或clientSecret无效", 7 101: "clientId或clientSecret无效",
@@ -76,6 +76,7 @@ func (s *AuthService) Login(request *protocol.LoginRequest) (rsp *protocol.Login @@ -76,6 +76,7 @@ func (s *AuthService) Login(request *protocol.LoginRequest) (rsp *protocol.Login
76 if result, err = CheckSmsCode(request.Phone, request.Code, protocol.SmsCode); result && err == nil { 76 if result, err = CheckSmsCode(request.Phone, request.Code, protocol.SmsCode); result && err == nil {
77 goto Success 77 goto Success
78 } else { 78 } else {
  79 + err = protocol.NewErrWithMessage(1012, err)
79 return 80 return
80 } 81 }
81 default: 82 default: