king
2024-08-07 e45bb599c2fa110056dc4c9f44204eab333260b2
src/api/index.js
@@ -1012,7 +1012,15 @@
        data: param
      }).then(res => {
        if (res.status && res.urlPath) {
          res.urlPath = window.GLOB.baseurl + res.urlPath
          if (!/Content\/images/.test(res.urlPath)) {
            let key = CryptoJS.enc.Utf8.parse('D1185ED7B32568C9')
            let wordArray = CryptoJS.enc.Base64.parse(res.urlPath)
            let decryptedWordArray = CryptoJS.AES.decrypt({ ciphertext: wordArray }, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
            res.urlPath = CryptoJS.enc.Utf8.stringify(decryptedWordArray)
          }
          if (!/^http/.test(res.urlPath)) {
            res.urlPath = window.GLOB.baseurl + res.urlPath
          }
        }
        resolve(res)
      })