chore: 优化部分代码

This commit is contained in:
2024-05-17 21:03:00 +08:00
parent d4b9057554
commit 3a44a818d8
7 changed files with 46 additions and 58 deletions

View File

@@ -77,7 +77,7 @@ import {
getBehaviorCaptcha
} from '@/apis/common/captcha'
import { resetSize } from '@/utils/verify'
import { aesEncrypt } from '@/utils/encrypt'
import { encryptByAes } from '@/utils/encrypt'
export default {
name: 'VerifyPoints',
@@ -224,7 +224,7 @@ export default {
setTimeout(() => {
// 发送后端请求
const captchaVerification = secretKey.value
? aesEncrypt(
? encryptByAes(
`${backToken.value}---${JSON.stringify(checkPosArr)}`,
secretKey.value
)
@@ -232,7 +232,7 @@ export default {
const data = {
captchaType: captchaType.value,
pointJson: secretKey.value
? aesEncrypt(JSON.stringify(checkPosArr), secretKey.value)
? encryptByAes(JSON.stringify(checkPosArr), secretKey.value)
: JSON.stringify(checkPosArr),
token: backToken.value
}

View File

@@ -108,7 +108,7 @@ import {
checkBehaviorCaptcha,
getBehaviorCaptcha
} from '@/apis/common/captcha'
import { aesEncrypt } from '@/utils/encrypt'
import { encryptByAes } from '@/utils/encrypt'
import { resetSize } from '@/utils/verify'
export default {
@@ -283,7 +283,7 @@ export default {
const data = {
captchaType: captchaType.value,
pointJson: secretKey.value
? aesEncrypt(
? encryptByAes(
JSON.stringify({ x: moveLeftDistance, y: 5.0 }),
secretKey.value
)
@@ -310,7 +310,7 @@ export default {
/ 1000
).toFixed(2)}s验证成功`
const captchaVerification = secretKey.value
? aesEncrypt(
? encryptByAes(
`${backToken.value}---${JSON.stringify({
x: moveLeftDistance,
y: 5.0