|
@@ -1,12 +1,11 @@
|
|
|
import ParserData from '@/api/crypto.js';
|
|
|
/* 解密数据处理 */
|
|
|
export function parseData(response) {
|
|
|
- // const headKeyStr=response.headers.dk
|
|
|
- // sessionStorage.setItem('dk',headKeyStr);
|
|
|
- // const desKey=ParserData.Des3Decrypt(headKeyStr,'JMCqSoUrTAmyNNIRb0TtlrPk')
|
|
|
- // let result = process.env.NODE_ENV == "production"
|
|
|
- // ? JSON.parse(ParserData.Des3Decrypt(response.data,desKey))
|
|
|
- // : response.data;
|
|
|
- let result=response.data
|
|
|
+ const headKeyStr=response.headers.dk
|
|
|
+ sessionStorage.setItem('dk',headKeyStr);
|
|
|
+ const desKey=ParserData.Des3Decrypt(headKeyStr,'JMCqSoUrTAmyNNIRb0TtlrPk')
|
|
|
+ let result = process.env.NODE_ENV == "production"
|
|
|
+ ? JSON.parse(ParserData.Des3Decrypt(response.data,desKey))
|
|
|
+ : response.data;
|
|
|
return result
|
|
|
}
|