Browse Source

fix:修改接口返回数据加密判断;

dxj
李朋徽 1 year ago
parent
commit
e6c3381da1
  1. 6
      src/utils/axios/index.ts

6
src/utils/axios/index.ts

@ -36,11 +36,7 @@ const transform: AxiosTransform = {
const newRes = cloneDeep(res)
let newData: Result
if (strHasArr(res.config.url!, notDecryptWhiteList)) {
newData = newRes.data
}
if (import.meta.env.VITE_GLOB_APP_TOKEN_SCHEME) {
if (import.meta.env.VITE_GLOB_APP_TOKEN_SCHEME && !strHasArr(res.config.url!, notDecryptWhiteList)) {
newData = JSON.parse(crypto.decryptAES(newRes.data as unknown as string, crypto.aesKey))
}
else {

Loading…
Cancel
Save