fix
This commit is contained in:
@@ -2,7 +2,7 @@ import other from './other';
|
||||
|
||||
// 从环境变量获取加密密钥
|
||||
const ENCRYPTION_KEY = import.meta.env.VITE_PWD_ENC_KEY;
|
||||
const ENCRYPTION_ENABLED = import.meta.env.VITE_API_ENC_ENABLED === 'true' ?? false;
|
||||
const ENCRYPTION_ENABLED = import.meta.env.VITE_API_ENC_ENABLED === 'true' ?? false;
|
||||
|
||||
/**
|
||||
* 使用指定密钥加密数据
|
||||
@@ -45,7 +45,7 @@ export function decrypt(encryptedData: string): any {
|
||||
*/
|
||||
export function encryptRequestParams(params: Record<string, any>): Record<string, string> {
|
||||
if (!ENCRYPTION_ENABLED) return params;
|
||||
|
||||
|
||||
const encryptedParams: Record<string, string> = {};
|
||||
for (const [paramKey, value] of Object.entries(params)) {
|
||||
if (value != null) {
|
||||
|
||||
Reference in New Issue
Block a user