Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
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
liyang
sts网站
Commits
eb9f3d37
Commit
eb9f3d37
authored
Jul 12, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改验证码开关变量名
parent
1a617904
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
706 additions
and
706 deletions
+706
-706
CaptchaController.java
...va/com/ruoyi/web/controller/common/CaptchaController.java
+3
-3
SysLoginService.java
...java/com/ruoyi/framework/web/service/SysLoginService.java
+2
-2
SysRegisterService.java
...a/com/ruoyi/framework/web/service/SysRegisterService.java
+2
-2
ISysConfigService.java
...main/java/com/ruoyi/system/service/ISysConfigService.java
+1
-1
SysConfigServiceImpl.java
...a/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
+4
-4
login.vue
ruoyi-ui/src/views/login.vue
+5
-5
resetPwd.vue
ruoyi-ui/src/views/system/user/profile/resetPwd.vue
+1
-1
ry_20220712.sql
sql/ry_20220712.sql
+688
-688
No files found.
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
View file @
eb9f3d37
...
...
@@ -46,9 +46,9 @@ public class CaptchaController
public
AjaxResult
getCode
(
HttpServletResponse
response
)
throws
IOException
{
AjaxResult
ajax
=
AjaxResult
.
success
();
boolean
captcha
OnOff
=
configService
.
selectCaptchaOnOff
();
ajax
.
put
(
"captcha
OnOff"
,
captchaOnOff
);
if
(!
captcha
OnOff
)
boolean
captcha
Enabled
=
configService
.
selectCaptchaEnabled
();
ajax
.
put
(
"captcha
Enabled"
,
captchaEnabled
);
if
(!
captcha
Enabled
)
{
return
ajax
;
}
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
View file @
eb9f3d37
...
...
@@ -60,9 +60,9 @@ public class SysLoginService
*/
public
String
login
(
String
username
,
String
password
,
String
code
,
String
uuid
)
{
boolean
captcha
OnOff
=
configService
.
selectCaptchaOnOff
();
boolean
captcha
Enabled
=
configService
.
selectCaptchaEnabled
();
// 验证码开关
if
(
captcha
OnOff
)
if
(
captcha
Enabled
)
{
validateCaptcha
(
username
,
code
,
uuid
);
}
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java
View file @
eb9f3d37
...
...
@@ -42,9 +42,9 @@ public class SysRegisterService
{
String
msg
=
""
,
username
=
registerBody
.
getUsername
(),
password
=
registerBody
.
getPassword
();
boolean
captcha
OnOff
=
configService
.
selectCaptchaOnOff
();
boolean
captcha
Enabled
=
configService
.
selectCaptchaEnabled
();
// 验证码开关
if
(
captcha
OnOff
)
if
(
captcha
Enabled
)
{
validateCaptcha
(
username
,
registerBody
.
getCode
(),
registerBody
.
getUuid
());
}
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java
View file @
eb9f3d37
...
...
@@ -31,7 +31,7 @@ public interface ISysConfigService
*
* @return true开启,false关闭
*/
public
boolean
selectCaptcha
OnOff
();
public
boolean
selectCaptcha
Enabled
();
/**
* 查询参数配置列表
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java
View file @
eb9f3d37
...
...
@@ -86,14 +86,14 @@ public class SysConfigServiceImpl implements ISysConfigService
* @return true开启,false关闭
*/
@Override
public
boolean
selectCaptcha
OnOff
()
public
boolean
selectCaptcha
Enabled
()
{
String
captcha
OnOff
=
selectConfigByKey
(
"sys.account.captchaOnOff
"
);
if
(
StringUtils
.
isEmpty
(
captcha
OnOff
))
String
captcha
Enabled
=
selectConfigByKey
(
"sys.account.captchaEnabled
"
);
if
(
StringUtils
.
isEmpty
(
captcha
Enabled
))
{
return
true
;
}
return
Convert
.
toBool
(
captcha
OnOff
);
return
Convert
.
toBool
(
captcha
Enabled
);
}
/**
...
...
ruoyi-ui/src/views/login.vue
View file @
eb9f3d37
...
...
@@ -23,7 +23,7 @@
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-form-item>
<el-form-item
prop=
"code"
v-if=
"captcha
OnOff
"
>
<el-form-item
prop=
"code"
v-if=
"captcha
Enabled
"
>
<el-input
v-model=
"loginForm.code"
auto-complete=
"off"
...
...
@@ -89,7 +89,7 @@ export default {
},
loading
:
false
,
// 验证码开关
captcha
OnOff
:
true
,
captcha
Enabled
:
true
,
// 注册开关
register
:
false
,
redirect
:
undefined
...
...
@@ -110,8 +110,8 @@ export default {
methods
:
{
getCode
()
{
getCodeImg
().
then
(
res
=>
{
this
.
captcha
OnOff
=
res
.
captchaOnOff
===
undefined
?
true
:
res
.
captchaOnOff
;
if
(
this
.
captcha
OnOff
)
{
this
.
captcha
Enabled
=
res
.
captchaEnabled
===
undefined
?
true
:
res
.
captchaEnabled
;
if
(
this
.
captcha
Enabled
)
{
this
.
codeUrl
=
"data:image/gif;base64,"
+
res
.
img
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
}
...
...
@@ -144,7 +144,7 @@ export default {
this
.
$router
.
push
({
path
:
this
.
redirect
||
"/"
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
this
.
loading
=
false
;
if
(
this
.
captcha
OnOff
)
{
if
(
this
.
captcha
Enabled
)
{
this
.
getCode
();
}
});
...
...
ruoyi-ui/src/views/system/user/profile/resetPwd.vue
View file @
eb9f3d37
...
...
@@ -7,7 +7,7 @@
<el-input
v-model=
"user.newPassword"
placeholder=
"请输入新密码"
type=
"password"
show-password
/>
</el-form-item>
<el-form-item
label=
"确认密码"
prop=
"confirmPassword"
>
<el-input
v-model=
"user.confirmPassword"
placeholder=
"请确认密码"
type=
"password"
show-password
/>
<el-input
v-model=
"user.confirmPassword"
placeholder=
"请确认
新
密码"
type=
"password"
show-password
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submit"
>
保存
</el-button>
...
...
sql/ry_20220
625
.sql
→
sql/ry_20220
712
.sql
View file @
eb9f3d37
...
...
@@ -539,7 +539,7 @@ create table sys_config (
insert
into
sys_config
values
(
1
,
'主框架页-默认皮肤样式名称'
,
'sys.index.skinName'
,
'skin-blue'
,
'Y'
,
'admin'
,
sysdate
(),
''
,
null
,
'蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow'
);
insert
into
sys_config
values
(
2
,
'用户管理-账号初始密码'
,
'sys.user.initPassword'
,
'123456'
,
'Y'
,
'admin'
,
sysdate
(),
''
,
null
,
'初始化密码 123456'
);
insert
into
sys_config
values
(
3
,
'主框架页-侧边栏主题'
,
'sys.index.sideTheme'
,
'theme-dark'
,
'Y'
,
'admin'
,
sysdate
(),
''
,
null
,
'深色主题theme-dark,浅色主题theme-light'
);
insert
into
sys_config
values
(
4
,
'账号自助-验证码开关'
,
'sys.account.captcha
OnOff'
,
'true'
,
'Y'
,
'admin'
,
sysdate
(),
''
,
null
,
'是否开启验证码功能(true开启,false关闭)'
);
insert
into
sys_config
values
(
4
,
'账号自助-验证码开关'
,
'sys.account.captcha
Enabled'
,
'true'
,
'Y'
,
'admin'
,
sysdate
(),
''
,
null
,
'是否开启验证码功能(true开启,false关闭)'
);
insert
into
sys_config
values
(
5
,
'账号自助-是否开启用户注册功能'
,
'sys.account.registerUser'
,
'false'
,
'Y'
,
'admin'
,
sysdate
(),
''
,
null
,
'是否开启注册用户功能(true开启,false关闭)'
);
...
...
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