【更新】登录页,验证码调整为随机 滑动/点选 类型

This commit is contained in:
dongxiayu 2021-06-04 16:12:31 +08:00
parent ea80b6d95e
commit 6fe7fc311a
2 changed files with 15 additions and 4 deletions

View File

@ -86,7 +86,7 @@
<Verify
@success="verifySuccess"
:mode="'pop'"
:captchaType="'clickWord'"
:captchaType="captchaType"
:imgSize="{ width: '330px', height: '155px' }"
ref="verify"
></Verify>
@ -139,6 +139,17 @@ export default {
Verify
},
data () {
var captchaTypeValue = 'clickWord'
var min = 0
var max = 100
var random = Math.floor(Math.random() * (max - min)) + min
if (random % 2 === 0) {
captchaTypeValue = 'blockPuzzle'
}
if (random % 2 === 1) {
captchaTypeValue = 'clickWord'
}
return {
customActiveKey: 'tab1',
loginBtn: false,
@ -159,8 +170,8 @@ export default {
tenantOpen: false,
captchaOpen: false, //
tenantsList: [],
loginParams: [] //
loginParams: [], //
captchaType: captchaTypeValue
}
},
created () {

View File

@ -66,7 +66,7 @@ logging:
aj:
captcha:
cache-type: local #分布式部署需要 自己实现CaptchaCacheService 使用redis需要配置redis相关配置
type: clickword #验证码类型 为点选 blockPuzzle 为滑块验证码
type: default #验证码类型 clickword 为点选 blockPuzzle 为滑块验证码 default 两种都实例化
font-type: 宋体
req-frequency-limit-enable: true #接口请求次数一分钟限制是否开启 true|false
req-get-lock-limit: 2 # 验证失败2次get接口锁定