|
|
@@ -76,11 +76,13 @@ function fetch(
|
|
|
}
|
|
|
}
|
|
|
const success = response => {
|
|
|
- // const tmps = desUrl.filter(e => url.indexOf(e) > -1)
|
|
|
- // if (tmps.length > 0) {
|
|
|
- // response = JSON.parse(crypto.decryptDES(response, crypto.desKey))
|
|
|
- // console.log(response)
|
|
|
- // }
|
|
|
+ const tmps = desUrl.filter(e => url.indexOf(e) > -1)
|
|
|
+ console.log(tmps.length)
|
|
|
+ if (tmps.length > 0) {
|
|
|
+ response.data = JSON.parse(
|
|
|
+ crypto.decryptDES(response.data, crypto.desKey)
|
|
|
+ )
|
|
|
+ }
|
|
|
const { status, data = {}, statusText } = response
|
|
|
if (status >= 200 && status <= 401) {
|
|
|
if (data.code === 401 || data.code === 400) {
|