diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java index 01b082f..e6f4cc8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java @@ -74,7 +74,7 @@ public class SysLoginController @PostMapping("/login/app") public AjaxResult loginForApp(@RequestBody LoginBody loginBody) { if (!"123456".equals(loginBody.getPassword())) { - throw new ServiceException("密码错误!"); + return AjaxResult.error("密码错误"); } return loginService.loginForApp(loginBody.getUsername(), loginBody.getPassword()); }