Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cnooc_zydeepen-cggl_expert-manage-miniapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙德龙
cnooc_zydeepen-cggl_expert-manage-miniapp
Commits
a31b5b87
Commit
a31b5b87
authored
Nov 18, 2025
by
刘红梅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图形验证码接口
parent
3be80b47
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/main/java/com/cnooc/expert/controller/auth/LoginController.java
+4
-5
src/main/java/com/cnooc/expert/controller/auth/model/request/VerifyRequest.java
+2
-0
No files found.
src/main/java/com/cnooc/expert/controller/auth/LoginController.java
View file @
a31b5b87
...
@@ -178,17 +178,16 @@ public class LoginController {
...
@@ -178,17 +178,16 @@ public class LoginController {
* 验证图片验证码
* 验证图片验证码
*/
*/
@PostMapping
(
"/verifyCaptcha"
)
@PostMapping
(
"/verifyCaptcha"
)
public
ResponseEntity
<
Map
<
String
,
Object
>>
verifyCaptchaNew
(
public
ApiResult
<
Map
<
String
,
Object
>>
verifyCaptchaNew
(
@RequestParam
String
captchaId
,
@RequestBody
VerifyRequest
request
)
{
@RequestParam
String
inputCode
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
boolean
flag
=
sysCaptchaService
.
validate
(
captchaId
,
inputCode
);
boolean
flag
=
sysCaptchaService
.
validate
(
request
.
getCaptchaId
(),
request
.
getInputCode
()
);
String
msg
=
"验证成功"
;
String
msg
=
"验证成功"
;
if
(!
flag
)
{
if
(!
flag
)
{
msg
=
"验证失败"
;
msg
=
"验证失败"
;
}
}
result
.
put
(
"success"
,
flag
);
result
.
put
(
"success"
,
flag
);
result
.
put
(
"message"
,
msg
);
result
.
put
(
"message"
,
msg
);
return
ResponseEntity
.
ok
(
result
);
return
ApiResult
.
successWithResult
(
result
);
}
}
}
}
src/main/java/com/cnooc/expert/controller/auth/model/request/VerifyRequest.java
View file @
a31b5b87
...
@@ -5,4 +5,6 @@ import lombok.Data;
...
@@ -5,4 +5,6 @@ import lombok.Data;
public
class
VerifyRequest
{
public
class
VerifyRequest
{
private
String
token
;
private
String
token
;
private
Integer
moveX
;
// 滑块移动的X距离
private
Integer
moveX
;
// 滑块移动的X距离
private
String
captchaId
;
private
String
inputCode
;
}
}
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