服务器代理
This commit is contained in:
parent
d438bdaf07
commit
2f63d39281
@ -5,7 +5,7 @@ ENV = 'development'
|
|||||||
VITE_BASE_PATH = './'
|
VITE_BASE_PATH = './'
|
||||||
|
|
||||||
# 代理配置(开发使用),必须在一行中
|
# 代理配置(开发使用),必须在一行中
|
||||||
VITE_APP_PROXY=[["/api","http://192.168.130.12:8080/api"]]
|
VITE_APP_PROXY=[["/api","https://test.jsspisoft.com/api"]]
|
||||||
|
|
||||||
# 开发环境下跨域代理,请输入要跨域的api地址 - 尾部无需带'/'
|
# 开发环境下跨域代理,请输入要跨域的api地址 - 尾部无需带'/'
|
||||||
# VITE_PROXY_URL = 'http://localhost:8000'
|
# VITE_PROXY_URL = 'http://localhost:8000'
|
||||||
|
@ -90,13 +90,11 @@ function createAxios<Data = any, T = ApiPromise<Data>>(axiosConfig: AxiosRequest
|
|||||||
|
|
||||||
if (config.method === 'post' && config.data) {
|
if (config.method === 'post' && config.data) {
|
||||||
// 对data进行加密
|
// 对data进行加密
|
||||||
// const formData = new FormData()
|
console.log(config.data)
|
||||||
// formData.append('param')
|
|
||||||
config.data = encrypt_aes(config.data, v)
|
config.data = encrypt_aes(config.data, v)
|
||||||
} else if (config.method === 'get' && config.params) {
|
} else if (config.method === 'get' && config.params) {
|
||||||
// 对params进行加密
|
// 对params进行加密
|
||||||
// const formData = new FormData()
|
console.log(config.params)
|
||||||
// formData.append('param')
|
|
||||||
config.params = encrypt_aes(config.params, v)
|
config.params = encrypt_aes(config.params, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import CryptoJS from 'crypto-js'
|
import CryptoJS from 'crypto-js'
|
||||||
|
|
||||||
const key = 'b6967ee87b86d85a'
|
const key = 'b6967ee87b86d85a'
|
||||||
|
const ivv = '6920559358617460'
|
||||||
|
|
||||||
export function encrypt_aes(text: any, iv: string) {
|
export function encrypt_aes(text: any, iv: string) {
|
||||||
let plaintText = text
|
let plaintText = text
|
||||||
|
Loading…
Reference in New Issue
Block a user