From 2f63d39281c0ffa190b2f4767ce4e6663069fca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=8E=89=E9=9C=9E?= Date: Thu, 27 Jun 2024 14:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/dasadmin/.env.development | 2 +- ui/dasadmin/src/utils/axios.ts | 6 ++---- ui/dasadmin/src/utils/crypto.ts | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/dasadmin/.env.development b/ui/dasadmin/.env.development index e5be6802..e9fad115 100644 --- a/ui/dasadmin/.env.development +++ b/ui/dasadmin/.env.development @@ -5,7 +5,7 @@ ENV = 'development' VITE_BASE_PATH = './' # 代理配置(开发使用),必须在一行中 -VITE_APP_PROXY=[["/api","http://192.168.130.12:8080/api"]] +VITE_APP_PROXY=[["/api","https://test.jsspisoft.com/api"]] # 开发环境下跨域代理,请输入要跨域的api地址 - 尾部无需带'/' # VITE_PROXY_URL = 'http://localhost:8000' diff --git a/ui/dasadmin/src/utils/axios.ts b/ui/dasadmin/src/utils/axios.ts index 7d557f16..96095ed9 100644 --- a/ui/dasadmin/src/utils/axios.ts +++ b/ui/dasadmin/src/utils/axios.ts @@ -90,13 +90,11 @@ function createAxios>(axiosConfig: AxiosRequest if (config.method === 'post' && config.data) { // 对data进行加密 - // const formData = new FormData() - // formData.append('param') + console.log(config.data) config.data = encrypt_aes(config.data, v) } else if (config.method === 'get' && config.params) { // 对params进行加密 - // const formData = new FormData() - // formData.append('param') + console.log(config.params) config.params = encrypt_aes(config.params, v) } diff --git a/ui/dasadmin/src/utils/crypto.ts b/ui/dasadmin/src/utils/crypto.ts index fbb2b260..aed80aef 100644 --- a/ui/dasadmin/src/utils/crypto.ts +++ b/ui/dasadmin/src/utils/crypto.ts @@ -1,6 +1,7 @@ import CryptoJS from 'crypto-js' const key = 'b6967ee87b86d85a' +const ivv = '6920559358617460' export function encrypt_aes(text: any, iv: string) { let plaintText = text