Commit b3afa34fea73bd814e801281650f6b6c047212cd
1 parent
dc3880b46a
Exists in
master
登录账号,发送验证码错误返回code
Showing 1 changed file with 5 additions and 2 deletions
webApi/src/main/java/com/lyms/yimiao/web/controller/v1/UserController.java
View file @
b3afa34
| ... | ... | @@ -86,8 +86,6 @@ |
| 86 | 86 | |
| 87 | 87 | LoginContext result = LoginUtil.login(phone, code, typeId, token); |
| 88 | 88 | Map<String, Object> map = new HashMap<>(); |
| 89 | - map.put("errorcode", result.getErrorcode()); | |
| 90 | - map.put("errormsg", result.getErrormsg()); | |
| 91 | 89 | //登陆的同时,在数据库创建账号,对手机号唯一性判断 |
| 92 | 90 | if (result.getToken()!=null){ |
| 93 | 91 | YmUsersQuery query = new YmUsersQuery(); |
| ... | ... | @@ -115,6 +113,11 @@ |
| 115 | 113 | map.put("token", result.getToken()); |
| 116 | 114 | map.put("id", users.getId()); |
| 117 | 115 | } |
| 116 | + map.put("errorcode", ConstantInterface.SUCCESS); | |
| 117 | + map.put("errormsg", "成功"); | |
| 118 | + }else { | |
| 119 | + map.put("errorcode", ConstantInterface.VERIFY_CODE_FAIL); | |
| 120 | + map.put("errormsg", "验证码发送失败"); | |
| 118 | 121 | } |
| 119 | 122 | writeJson(response, JsonUtil.obj2JsonString(map)); |
| 120 | 123 | } |