update
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user