Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
eb9f3d37
提交
eb9f3d37
authored
7月 12, 2022
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改验证码开关变量名
上级
1a617904
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
18 行增加
和
18 行删除
+18
-18
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
+0
-0
没有找到文件。
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
eb9f3d37
This source diff could not be displayed because it is too large. You can
view the blob
instead.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论