diff --git a/src/utils/httpRequest.js b/src/utils/httpRequest.js index b5c86fe..15b2e25 100644 --- a/src/utils/httpRequest.js +++ b/src/utils/httpRequest.js @@ -35,18 +35,18 @@ http.interceptors.request.use( config => { config.headers["token"] =`Bearer ${Vue.cookie.get("token")}`; // 请求头带上token // 针对post请求加密 - if (config.method.toLowerCase() === "post" && process.env.NODE_ENV === "production" ) { - //如果已经转成字符串了,就不用再转了 - if (typeof config.data === "string") { - config.data = des.encryptByDES(config.data, "u48rE-RlGbua_K_m$*#z99lt"); - } else { - //否则要转一次 - config.data = des.encryptByDES( - JSON.stringify(config.data), - "u48rE-RlGbua_K_m$*#z99lt" - ); - } - } + // if (config.method.toLowerCase() === "post" && process.env.NODE_ENV === "production" ) { + // //如果已经转成字符串了,就不用再转了 + // if (typeof config.data === "string") { + // config.data = des.encryptByDES(config.data, "u48rE-RlGbua_K_m$*#z99lt"); + // } else { + // //否则要转一次 + // config.data = des.encryptByDES( + // JSON.stringify(config.data), + // "u48rE-RlGbua_K_m$*#z99lt" + // ); + // } + // } if (process.env.NODE_ENV !== "production") { console.log(`【请求】${config.url}`, config); }