mirror of https://github.com/jeecgboot/jeecg-boot
Jeecg-Boot 2.1.4 版本发布 (新版问题修复)
parent
7bc3931e1a
commit
865ace6db0
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -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 () {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
USE jeecg-boot;
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
|
|
|
@ -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:20200213 for:加入部门权限 -->
|
||||
<!--update begin Author:lvdandan Date:20200225 for:加入部门权限 -->
|
||||
UNION
|
||||
SELECT p.*
|
||||
FROM sys_permission p
|
||||
|
|
|
@ -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
|
||||
|
||||
//写到指定位置
|
||||
|
|
Loading…
Reference in New Issue