正在显示
2 个修改的文件
包含
4 行增加
和
1 行删除
@@ -67,6 +67,9 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp | @@ -67,6 +67,9 @@ func Login(header *protocol.RequestHeader, request *protocol.LoginRequest) (rsp | ||
67 | return | 67 | return |
68 | } | 68 | } |
69 | break | 69 | break |
70 | + default: | ||
71 | + err = protocol.NewCustomMessage(1, "登录方式不支持!") | ||
72 | + break | ||
70 | } | 73 | } |
71 | rsp.AuthCode, _ = utils.GenerateToken(partnerInfo.Id, protocol.AuthCodeExpire*time.Second) | 74 | rsp.AuthCode, _ = utils.GenerateToken(partnerInfo.Id, protocol.AuthCodeExpire*time.Second) |
72 | return | 75 | return |
@@ -2,7 +2,7 @@ package protocol | @@ -2,7 +2,7 @@ package protocol | ||
2 | 2 | ||
3 | const ( | 3 | const ( |
4 | LoginByPassword = "signInPassword" | 4 | LoginByPassword = "signInPassword" |
5 | - LoginBySmsCode = " signInCaptcha" | 5 | + LoginBySmsCode = "signInCaptcha" |
6 | ) | 6 | ) |
7 | 7 | ||
8 | const AuthCodeExpire = 60 * 15 | 8 | const AuthCodeExpire = 60 * 15 |
-
请 注册 或 登录 后发表评论