Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷月半明
jeecg-boot
提交
865ace6d
J
jeecg-boot
项目概览
冷月半明
/
jeecg-boot
与 Fork 源项目一致
Fork自
jeecg / jeecg-boot
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jeecg-boot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
865ace6d
编写于
2月 25, 2020
作者:
JEECG低代码平台
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Jeecg-Boot 2.1.4 版本发布 (新版问题修复)
上级
7bc3931e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
18 deletion
+35
-18
ant-design-vue-jeecg/src/assets/checkcode.png
ant-design-vue-jeecg/src/assets/checkcode.png
+0
-0
ant-design-vue-jeecg/src/views/user/Login.vue
ant-design-vue-jeecg/src/views/user/Login.vue
+11
-5
ant-design-vue-jeecg/vue.config.js
ant-design-vue-jeecg/vue.config.js
+8
-0
jeecg-boot/db/2jeecgboot_mysql5.7.sql
jeecg-boot/db/2jeecgboot_mysql5.7.sql
+0
-1
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml
...g/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml
+11
-8
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/RandImageUtil.java
...ain/java/org/jeecg/modules/system/util/RandImageUtil.java
+5
-4
未找到文件。
ant-design-vue-jeecg/src/assets/checkcode.png
0 → 100644
浏览文件 @
865ace6d
2.2 KB
ant-design-vue-jeecg/src/views/user/Login.vue
浏览文件 @
865ace6d
...
...
@@ -9,16 +9,16 @@
<a-form-item>
<a-input
size=
"large"
v-decorator=
"['username',
{initialValue:'admin', rules: validatorRules.username.rules
}]"
v-decorator=
"['username',
validatorRules.username,
{ validator: this.handleUsernameOrEmail
}]"
type="text"
placeholder="请输入帐户名 /
jeecg
">
placeholder="请输入帐户名 /
admin
">
<a-icon
slot=
"prefix"
type=
"user"
:style=
"
{ color: 'rgba(0,0,0,.25)' }"/>
</a-input>
</a-form-item>
<a-form-item>
<a-input
v-decorator=
"['password',
{initialValue:'123456', rules: validatorRules.password.rules}
]"
v-decorator=
"['password',
validatorRules.password
]"
size=
"large"
type=
"password"
autocomplete=
"false"
...
...
@@ -41,7 +41,8 @@
</a-form-item>
</a-col>
<a-col
:span=
"8"
style=
"text-align: right"
>
<img
style=
"margin-top: 2px;"
:src=
"randCodeImage"
@
click=
"handleChangeCheckCode"
/>
<img
v-if=
"requestCodeSuccess"
style=
"margin-top: 2px;"
:src=
"randCodeImage"
@
click=
"handleChangeCheckCode"
/>
<img
v-else
style=
"margin-top: 2px;"
src=
"../../assets/checkcode.png"
@
click=
"handleChangeCheckCode"
/>
<!--
<j-graphic-code
@
success=
"generateCode"
ref=
"jgraphicCodeRef"
style=
"float: right"
remote
></j-graphic-code>
-->
</a-col>
</a-row>
...
...
@@ -217,7 +218,8 @@
currentUsername
:
""
,
validate_status
:
""
,
currdatetime
:
''
,
randCodeImage
:
''
randCodeImage
:
''
,
requestCodeSuccess
:
false
}
},
created
()
{
...
...
@@ -346,9 +348,13 @@
getAction
(
`/sys/randomImage/
${
this
.
currdatetime
}
`
).
then
(
res
=>
{
if
(
res
.
success
){
this
.
randCodeImage
=
res
.
result
this
.
requestCodeSuccess
=
true
}
else
{
this
.
$message
.
error
(
res
.
message
)
this
.
requestCodeSuccess
=
false
}
}).
catch
(()
=>
{
this
.
requestCodeSuccess
=
false
})
},
loginSuccess
()
{
...
...
ant-design-vue-jeecg/vue.config.js
浏览文件 @
865ace6d
...
...
@@ -30,6 +30,14 @@ module.exports = {
.
set
(
'
@comp
'
,
resolve
(
'
src/components
'
))
.
set
(
'
@views
'
,
resolve
(
'
src/views
'
))
.
set
(
'
@layout
'
,
resolve
(
'
src/layout
'
))
// 配置 webpack 识别 markdown 为普通的文件
config
.
module
.
rule
(
'
markdown
'
)
.
test
(
/
\.
md$/
)
.
use
()
.
loader
(
'
file-loader
'
)
.
end
()
},
css
:
{
...
...
jeecg-boot/db/2jeecgboot_mysql5.7.sql
浏览文件 @
865ace6d
USE jeecg-boot;
/*
Navicat Premium Data Transfer
...
...
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml
浏览文件 @
865ace6d
...
...
@@ -44,15 +44,18 @@
SELECT * FROM (
SELECT p.*
FROM sys_permission p
WHERE exists(
select a.id from sys_role_permission a
join sys_role b on a.role_id = b.id
join sys_user_role c on c.role_id = b.id
join sys_user d on d.id = c.user_id
where p.id = a.permission_id AND d.username = #{username,jdbcType=VARCHAR}
)
WHERE (exists(
select a.id from sys_role_permission a
join sys_role b on a.role_id = b.id
join sys_user_role c on c.role_id = b.id
join sys_user d on d.id = c.user_id
where p.id = a.permission_id AND d.username = #{username,jdbcType=VARCHAR}
)
<!--update begin Author:taoyan Date:20200225 for:默认授权online的auto动态隐藏路由 -->
or (p.url like '%:code' and p.url like '/online%' and p.hidden = 1) )
<!--update end Author:taoyan Date:20200213 for:默认授权online的auto动态隐藏路由 -->
and p.del_flag = 0
<!--update begin Author:lvdandan Date:202002
13
for:加入部门权限 -->
<!--update begin Author:lvdandan Date:202002
25
for:加入部门权限 -->
UNION
SELECT p.*
FROM sys_permission p
...
...
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/RandImageUtil.java
浏览文件 @
865ace6d
package
org.jeecg.modules.system.util
;
import
sun.misc.BASE64Encoder
;
import
javax.imageio.ImageIO
;
import
javax.servlet.http.HttpServletResponse
;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.util.Base64
;
import
java.util.Random
;
/**
* 登录验证码工具类
*/
public
class
RandImageUtil
{
public
static
final
String
key
=
"JEECG_LOGIN_KEY"
;
...
...
@@ -69,9 +71,8 @@ public class RandImageUtil {
ImageIO
.
write
(
image
,
IMG_FORMAT
,
byteStream
);
//转换成字节
byte
[]
bytes
=
byteStream
.
toByteArray
();
BASE64Encoder
encoder
=
new
BASE64Encoder
();
//转换成base64串
String
base64
=
encoder
.
encodeBuffer
(
bytes
).
trim
();
String
base64
=
Base64
.
getEncoder
().
encodeToString
(
bytes
).
trim
();
base64
=
base64
.
replaceAll
(
"\n"
,
""
).
replaceAll
(
"\r"
,
""
);
//删除 \r\n
//写到指定位置
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录