【更新】登录页,验证码调整为随机 滑动/点选 类型
This commit is contained in:
parent
ea80b6d95e
commit
6fe7fc311a
@ -86,7 +86,7 @@
|
|||||||
<Verify
|
<Verify
|
||||||
@success="verifySuccess"
|
@success="verifySuccess"
|
||||||
:mode="'pop'"
|
:mode="'pop'"
|
||||||
:captchaType="'clickWord'"
|
:captchaType="captchaType"
|
||||||
:imgSize="{ width: '330px', height: '155px' }"
|
:imgSize="{ width: '330px', height: '155px' }"
|
||||||
ref="verify"
|
ref="verify"
|
||||||
></Verify>
|
></Verify>
|
||||||
@ -139,6 +139,17 @@ export default {
|
|||||||
Verify
|
Verify
|
||||||
},
|
},
|
||||||
data () {
|
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 {
|
return {
|
||||||
customActiveKey: 'tab1',
|
customActiveKey: 'tab1',
|
||||||
loginBtn: false,
|
loginBtn: false,
|
||||||
@ -159,8 +170,8 @@ export default {
|
|||||||
tenantOpen: false,
|
tenantOpen: false,
|
||||||
captchaOpen: false, // 是否开启验证码
|
captchaOpen: false, // 是否开启验证码
|
||||||
tenantsList: [],
|
tenantsList: [],
|
||||||
loginParams: [] // 登录参数
|
loginParams: [], // 登录参数
|
||||||
|
captchaType: captchaTypeValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
@ -66,7 +66,7 @@ logging:
|
|||||||
aj:
|
aj:
|
||||||
captcha:
|
captcha:
|
||||||
cache-type: local #分布式部署需要 自己实现CaptchaCacheService 使用redis需要配置redis相关配置
|
cache-type: local #分布式部署需要 自己实现CaptchaCacheService 使用redis需要配置redis相关配置
|
||||||
type: clickword #验证码类型 为点选 blockPuzzle 为滑块验证码
|
type: default #验证码类型 clickword 为点选 blockPuzzle 为滑块验证码 default 两种都实例化
|
||||||
font-type: 宋体
|
font-type: 宋体
|
||||||
req-frequency-limit-enable: true #接口请求次数一分钟限制是否开启 true|false
|
req-frequency-limit-enable: true #接口请求次数一分钟限制是否开启 true|false
|
||||||
req-get-lock-limit: 2 # 验证失败2次,get接口锁定
|
req-get-lock-limit: 2 # 验证失败2次,get接口锁定
|
||||||
|
Loading…
x
Reference in New Issue
Block a user