diff --git a/ant-design-vue-jeecg/src/assets/checkcode.png b/ant-design-vue-jeecg/src/assets/checkcode.png
new file mode 100644
index 0000000000000000000000000000000000000000..ed86ad16d9581a2ee7643d2294b4a4cb4b84c205
Binary files /dev/null and b/ant-design-vue-jeecg/src/assets/checkcode.png differ
diff --git a/ant-design-vue-jeecg/src/views/user/Login.vue b/ant-design-vue-jeecg/src/views/user/Login.vue
index 2f70744a6ade2a2b895490c14eb74ff893a21f52..d6ece74db40a4ecde733de4a79b40fd6b396617e 100644
--- a/ant-design-vue-jeecg/src/views/user/Login.vue
+++ b/ant-design-vue-jeecg/src/views/user/Login.vue
@@ -9,16 +9,16 @@
+ placeholder="请输入帐户名 / admin">
-
+
+
@@ -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 () {
diff --git a/ant-design-vue-jeecg/vue.config.js b/ant-design-vue-jeecg/vue.config.js
index 9782dcf6880fb693ef2c4dc9ff535b6340964ff5..fcabbe21392fc29014703c07157407e8eb904cc6 100644
--- a/ant-design-vue-jeecg/vue.config.js
+++ b/ant-design-vue-jeecg/vue.config.js
@@ -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: {
diff --git a/jeecg-boot/db/2jeecgboot_mysql5.7.sql b/jeecg-boot/db/2jeecgboot_mysql5.7.sql
index 00733e895e3e99e8573ba126463e2af5bda2e7a8..09e725ff3a918247d11c80595ccb8c3f231885c7 100644
--- a/jeecg-boot/db/2jeecgboot_mysql5.7.sql
+++ b/jeecg-boot/db/2jeecgboot_mysql5.7.sql
@@ -1,4 +1,3 @@
-USE jeecg-boot;
/*
Navicat Premium Data Transfer
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml
index 5cb79e36ff90bc0e04169264b9a9707b600ef9d4..5cf617b7d6147329b4ab29c52acd68afb7499fc9 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml
@@ -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}
+ )
+
+ or (p.url like '%:code' and p.url like '/online%' and p.hidden = 1) )
+
and p.del_flag = 0
-
+
UNION
SELECT p.*
FROM sys_permission p
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/RandImageUtil.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/RandImageUtil.java
index e110362d2efb99d58f41e78ebba0335c6ee0a47d..4697821cc9d6d805ae96a18cb00bad0d84bb1e61 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/RandImageUtil.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/RandImageUtil.java
@@ -1,15 +1,17 @@
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
//写到指定位置