feat:天平连接

This commit is contained in:
houjunxiang
2025-10-10 18:16:14 +08:00
parent 2b50debcd3
commit c8b2d8683e
16 changed files with 182 additions and 622 deletions

View File

@@ -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