Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fj-captcha-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
郑磊
fj-captcha-service
Commits
6b7ab953
Commit
6b7ab953
authored
May 17, 2024
by
郑磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改回显验证数据接口
parent
87310464
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
CaptchaController.java
...in/java/com/fanjiao/captcha/server/CaptchaController.java
+14
-4
VerifyCaptchaData.java
...ava/com/fanjiao/captcha/server/dto/VerifyCaptchaData.java
+8
-0
No files found.
server/src/main/java/com/fanjiao/captcha/server/CaptchaController.java
View file @
6b7ab953
...
...
@@ -123,13 +123,23 @@ public class CaptchaController {
@RequestMapping
(
"/verify"
)
@ResponseBody
public
Response
<?>
verifyCaptcha
(
@RequestParam
(
name
=
"key"
)
String
key
@RequestParam
(
name
=
"key"
,
required
=
false
)
String
keyOfQuery
,
@RequestBody
(
required
=
false
)
VerifyCaptchaData
data
)
{
var
data
=
imageCaptchaApplication
.
getSecondaryData
(
key
);
if
(
data
==
null
)
{
String
key
=
null
;
//如果有POST那么POST优先
if
(
data
!=
null
)
{
key
=
data
.
getKey
();
}
if
(
key
==
null
)
{
key
=
keyOfQuery
;
}
var
info
=
imageCaptchaApplication
.
getSecondaryData
(
key
);
if
(
info
==
null
)
{
return
Response
.
fail
(
"未验证的数据"
);
}
else
{
return
Response
.
success
(
data
);
return
Response
.
success
(
info
);
}
}
}
server/src/main/java/com/fanjiao/captcha/server/dto/VerifyCaptchaData.java
0 → 100644
View file @
6b7ab953
package
com
.
fanjiao
.
captcha
.
server
.
dto
;
import
lombok.Data
;
@Data
public
class
VerifyCaptchaData
{
private
String
key
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment