Преглед на файлове

修改微信未注册返回格式

mingfu преди 1 месец
родител
ревизия
f4f51e9a66
променени са 1 файла, в които са добавени 1 реда и са изтрити 4 реда
  1. 1 4
      ie-admin/src/main/java/com/ruoyi/web/service/SysLoginService.java

+ 1 - 4
ie-admin/src/main/java/com/ruoyi/web/service/SysLoginService.java

@@ -101,10 +101,7 @@ public class SysLoginService
     public AjaxResult loginByCode(String openId, String phoneNumber) {
         SysUser u = userService.selectUserByOpenId(openId);
         if(null == u) {
-            AjaxResult result = new AjaxResult(ErrorCodes.UnRegister.getCode(), "账号不存在");
-            result.put("openId", openId);
-            result.put("mobile", phoneNumber);
-            return result;
+            return AjaxResult.success("", JSONObject.of("code", ErrorCodes.UnRegister.getCode(), "openId", openId, "mobile", phoneNumber, "message", "用户不存在"));
         }
         return loginByUserAndPass("front", phoneNumber, UserConstants.LOGIN_SMS_PASS);
     }