fix:修复滑块验证不拖动滑块时的问题

当未拖动滑块时,parseInt出来的结果是NaN,调用后端接口后,会出现系统异常

Signed-off-by: 我在路旁寻觅狗 <1327410210@qq.com>
This commit is contained in:
我在路旁寻觅狗
2024-12-12 07:20:04 +00:00
committed by Gitee
parent bd0a80b64a
commit 8a7b1b1a85

View File

@@ -206,7 +206,7 @@ function end() {
endMovetime.value = +new Date()
// 判断是否重合
if (status.value && isEnd.value === false) {
let moveLeftDistance = Number.parseInt((moveBlockLeft.value || '').replace('px', ''))
let moveLeftDistance = Number.parseInt((moveBlockLeft.value || 0))
moveLeftDistance = (moveLeftDistance * 310) / Number.parseInt(setSize.imgWidth)
const data = {
captchaType: captchaType.value,