This commit is contained in:
2025-04-23 19:48:47 +08:00
parent 86aa66800c
commit fbfd175258
12 changed files with 469 additions and 112 deletions

View File

@@ -20,11 +20,13 @@ request.interceptors.request.use((config) => {
console.log('请求拦截器', config.data);
const {context, iv} = AESCrypto.encrypt(JSON.stringify(config.data));
if (!config.UN_AES) {
const {context, iv} = AESCrypto.encrypt(JSON.stringify(config.data));
config.data = {
requestData: context, iv: iv,
};
config.data = {
requestData: context, iv: iv,
};
}
return config;
}, (error) => {
@@ -41,6 +43,7 @@ request.interceptors.response.use((response) => {
}
if (code !== 1) {
Message.error(msg);
return Promise.reject(msg);
}
if (!data.data) {
return {msg, code, data}