Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
eb9f3d37
Commit
eb9f3d37
authored
Jul 12, 2022
by
RuoYi
Browse files
修改验证码开关变量名
parent
1a617904
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
View file @
eb9f3d37
...
@@ -46,9 +46,9 @@ public class CaptchaController
...
@@ -46,9 +46,9 @@ public class CaptchaController
public
AjaxResult
getCode
(
HttpServletResponse
response
)
throws
IOException
public
AjaxResult
getCode
(
HttpServletResponse
response
)
throws
IOException
{
{
AjaxResult
ajax
=
AjaxResult
.
success
();
AjaxResult
ajax
=
AjaxResult
.
success
();
boolean
captcha
OnOff
=
configService
.
selectCaptcha
OnOff
();
boolean
captcha
Enabled
=
configService
.
selectCaptcha
Enabled
();
ajax
.
put
(
"captcha
OnOff
"
,
captcha
OnOff
);
ajax
.
put
(
"captcha
Enabled
"
,
captcha
Enabled
);
if
(!
captcha
OnOff
)
if
(!
captcha
Enabled
)
{
{
return
ajax
;
return
ajax
;
}
}
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
View file @
eb9f3d37
...
@@ -60,9 +60,9 @@ public class SysLoginService
...
@@ -60,9 +60,9 @@ public class SysLoginService
*/
*/
public
String
login
(
String
username
,
String
password
,
String
code
,
String
uuid
)
public
String
login
(
String
username
,
String
password
,
String
code
,
String
uuid
)
{
{
boolean
captcha
OnOff
=
configService
.
selectCaptcha
OnOff
();
boolean
captcha
Enabled
=
configService
.
selectCaptcha
Enabled
();
// 验证码开关
// 验证码开关
if
(
captcha
OnOff
)
if
(
captcha
Enabled
)
{
{
validateCaptcha
(
username
,
code
,
uuid
);
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
...
@@ -42,9 +42,9 @@ public class SysRegisterService
{
{
String
msg
=
""
,
username
=
registerBody
.
getUsername
(),
password
=
registerBody
.
getPassword
();
String
msg
=
""
,
username
=
registerBody
.
getUsername
(),
password
=
registerBody
.
getPassword
();
boolean
captcha
OnOff
=
configService
.
selectCaptcha
OnOff
();
boolean
captcha
Enabled
=
configService
.
selectCaptcha
Enabled
();
// 验证码开关
// 验证码开关
if
(
captcha
OnOff
)
if
(
captcha
Enabled
)
{
{
validateCaptcha
(
username
,
registerBody
.
getCode
(),
registerBody
.
getUuid
());
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
...
@@ -31,7 +31,7 @@ public interface ISysConfigService
*
*
* @return true开启,false关闭
* @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
...
@@ -86,14 +86,14 @@ public class SysConfigServiceImpl implements ISysConfigService
* @return true开启,false关闭
* @return true开启,false关闭
*/
*/
@Override
@Override
public
boolean
selectCaptcha
OnOff
()
public
boolean
selectCaptcha
Enabled
()
{
{
String
captcha
OnOff
=
selectConfigByKey
(
"sys.account.captcha
OnOff
"
);
String
captcha
Enabled
=
selectConfigByKey
(
"sys.account.captcha
Enabled
"
);
if
(
StringUtils
.
isEmpty
(
captcha
OnOff
))
if
(
StringUtils
.
isEmpty
(
captcha
Enabled
))
{
{
return
true
;
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 @@
...
@@ -23,7 +23,7 @@
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
<svg-icon
slot=
"prefix"
icon-class=
"password"
class=
"el-input__icon input-icon"
/>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
v-if=
"captcha
OnOff
"
>
<el-form-item
prop=
"code"
v-if=
"captcha
Enabled
"
>
<el-input
<el-input
v-model=
"loginForm.code"
v-model=
"loginForm.code"
auto-complete=
"off"
auto-complete=
"off"
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
},
},
loading
:
false
,
loading
:
false
,
// 验证码开关
// 验证码开关
captcha
OnOff
:
true
,
captcha
Enabled
:
true
,
// 注册开关
// 注册开关
register
:
false
,
register
:
false
,
redirect
:
undefined
redirect
:
undefined
...
@@ -110,8 +110,8 @@ export default {
...
@@ -110,8 +110,8 @@ export default {
methods
:
{
methods
:
{
getCode
()
{
getCode
()
{
getCodeImg
().
then
(
res
=>
{
getCodeImg
().
then
(
res
=>
{
this
.
captcha
OnOff
=
res
.
captcha
OnOff
===
undefined
?
true
:
res
.
captcha
OnOff
;
this
.
captcha
Enabled
=
res
.
captcha
Enabled
===
undefined
?
true
:
res
.
captcha
Enabled
;
if
(
this
.
captcha
OnOff
)
{
if
(
this
.
captcha
Enabled
)
{
this
.
codeUrl
=
"
data:image/gif;base64,
"
+
res
.
img
;
this
.
codeUrl
=
"
data:image/gif;base64,
"
+
res
.
img
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
this
.
loginForm
.
uuid
=
res
.
uuid
;
}
}
...
@@ -144,7 +144,7 @@ export default {
...
@@ -144,7 +144,7 @@ export default {
this
.
$router
.
push
({
path
:
this
.
redirect
||
"
/
"
}).
catch
(()
=>
{});
this
.
$router
.
push
({
path
:
this
.
redirect
||
"
/
"
}).
catch
(()
=>
{});
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
this
.
captcha
OnOff
)
{
if
(
this
.
captcha
Enabled
)
{
this
.
getCode
();
this
.
getCode
();
}
}
});
});
...
...
ruoyi-ui/src/views/system/user/profile/resetPwd.vue
View file @
eb9f3d37
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<el-input
v-model=
"user.newPassword"
placeholder=
"请输入新密码"
type=
"password"
show-password
/>
<el-input
v-model=
"user.newPassword"
placeholder=
"请输入新密码"
type=
"password"
show-password
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"确认密码"
prop=
"confirmPassword"
>
<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-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submit"
>
保存
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submit"
>
保存
</el-button>
...
...
sql/ry_20220
625
.sql
→
sql/ry_20220
712
.sql
View file @
eb9f3d37
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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