Browse Source

获取验证码结果

dzx 8 months ago
parent
commit
b1ed4d8fcc

+ 11 - 0
src/main/java/com/xjrsoft/module/system/controller/LoginController.java

@@ -290,4 +290,15 @@ public class LoginController {
         String authorizeUrl = authRequest.authorize(AuthStateUtils.createState());
         return R.ok(authorizeUrl);
     }
+
+    @GetMapping("/imgcaptcha-answer")
+    @ApiOperation(value = "图形验证码", notes = "图形验证码")
+    public R imgcaptchaAnswer(String key) {
+        String active = SpringUtil.getActiveProfile();
+        if(!"dev".equals(active)){
+            return R.ok();
+        }
+
+        return R.ok(redisUtil.get(key));
+    }
 }