|
|
@@ -47,7 +47,7 @@ public class login {
|
|
|
private static final Logger log = LoggerFactory.getLogger(login.class);
|
|
|
@ApiOperation("登录")
|
|
|
@PostMapping(value = "/login",name = "登录")
|
|
|
- public ApiResult auth(@RequestBody UserForm userForm){
|
|
|
+ public ApiResult<TokenInfoPO> auth(@RequestBody UserForm userForm){
|
|
|
try {
|
|
|
// 验证码校验是否开启
|
|
|
if (captchaType) {
|
|
|
@@ -73,7 +73,7 @@ public class login {
|
|
|
return ApiResult.result(ApiResult.DEFAULT_SUCCEED_CODE, "登录成功", tokenInfoPO);
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage());
|
|
|
- return ApiResult.failure("登录失败",e.getMessage());
|
|
|
+ return ApiResult.failure("登录失败",null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -105,7 +105,7 @@ public class login {
|
|
|
|
|
|
@ApiOperation("获取验证码")
|
|
|
@GetMapping("/captcha")
|
|
|
- public ApiResult getCaptcha() {
|
|
|
+ public ApiResult<CaptchaPO> getCaptcha() {
|
|
|
try {
|
|
|
String captcha = CaptchaUtil.generateRandomString();
|
|
|
byte[] captchaImage = CaptchaUtil.generateCaptcha(captcha);
|