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