加密已通

This commit is contained in:
xk_guohonglei
2020-09-01 17:31:42 +08:00
parent fc6ae600a4
commit 39d433998a
6 changed files with 53 additions and 16 deletions

View File

@@ -62,11 +62,11 @@ service.interceptors.response.use(
// if (env === 'production') {
// 生产环境,进行加密解密,不输出日志
// if (res.encrypt === 1) {
if (res.encrypt === 1) {
// 加密的数据,需要解密
const dataParam = JSON.parse(utils.decrypt(res.data))
res.data = JSON.stringify(dataParam) === '{}' ? null : dataParam
// }
}
// } else {
console.log('请求路径', response.config.url, '返回结果未加密', res)
console.log('-------------------------------------------')