feat:天平连接
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'
|
||||
import sysApi from '@/nx/api/sys'
|
||||
import nx from '@/nx'
|
||||
import { aesEncrypt } from './utils/aes'
|
||||
|
||||
const props = defineProps({
|
||||
@@ -196,7 +196,7 @@ function resetState() {
|
||||
async function loadCaptcha() {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await sysApi.getCaptchaCode({ captchaType: props.captchaType })
|
||||
const res = await nx.$api.sys.getCaptchaCode({ captchaType: props.captchaType })
|
||||
if (res && (res.repCode === '0000' || res.code === 0)) {
|
||||
const data = res.repData || res.data || {}
|
||||
captchaState.originalImageBase64 = data.originalImageBase64 || ''
|
||||
@@ -292,7 +292,7 @@ async function submitVerification() {
|
||||
? aesEncrypt(JSON.stringify(point), captchaState.secretKey)
|
||||
: JSON.stringify(point)
|
||||
|
||||
const res = await sysApi.verifyCaptcha({
|
||||
const res = await nx.$api.sys.verifyCaptcha({
|
||||
captchaType: props.captchaType,
|
||||
token: captchaState.token,
|
||||
pointJson: payload
|
||||
|
||||
Reference in New Issue
Block a user