From 11be4fa888dcbb55bbf43b6caf1f4a4abd16a208 Mon Sep 17 00:00:00 2001 From: whyczyk <525500596@qq.com> Date: 星期四, 09 六月 2022 10:05:36 +0800 Subject: [PATCH] 大屏对接2.0项目 --- src/assets/js/axios.js | 54 +++++++++++++++++++++++------------------------------- 1 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/assets/js/axios.js b/src/assets/js/axios.js index a6baa5a..5cb1086 100644 --- a/src/assets/js/axios.js +++ b/src/assets/js/axios.js @@ -15,40 +15,32 @@ axios.interceptors.request.use(function (config) { if (config.asy) { if (process.env.NODE_ENV == 'dev') { - if (store.state.app.newPlatform == 1) { - config.baseURL = 'http://localhost:8091/fg'; - } else { - config.baseURL = 'http://localhost:8919/fg'; - } + config.baseURL = 'http://localhost:8919/fg'; } else { - if (store.state.app.newPlatform == 1) { - config.baseURL = `http://${location.hostname}:8091/fg`; - } else { - config.baseURL = `http://${location.hostname}:8919/fg`; - } + config.baseURL = `http://${location.hostname}:8919/fg`; } config.withCredentials = true; // 淇濇寔璇锋眰澶� - if (store.state.app.newPlatform != 1) { - // 闃查噸鏀炬搷浣� - let rejectReplayStr = rejectReplay(); - let url = config.url; - let isIn = false; - for (let i = 0; i < skipUrls.length; i++) { - let skipUrl = skipUrls[i]; - if (skipUrl == url) { - isIn = true; - break; - } - } - if (!isIn) { - if (url.indexOf("?") == -1) { - url = url.trim() + "?" + rejectReplayStr; - } else { - url = url.trim() + "&" + rejectReplayStr; - } - } - config.url = url; - } + // if (store.state.app.newPlatform != 1) { + // // 闃查噸鏀炬搷浣� + // let rejectReplayStr = rejectReplay(); + // let url = config.url; + // let isIn = false; + // for (let i = 0; i < skipUrls.length; i++) { + // let skipUrl = skipUrls[i]; + // if (skipUrl == url) { + // isIn = true; + // break; + // } + // } + // if (!isIn) { + // if (url.indexOf("?") == -1) { + // url = url.trim() + "?" + rejectReplayStr; + // } else { + // url = url.trim() + "&" + rejectReplayStr; + // } + // } + // config.url = url; + // } } // 鍦ㄥ彂閫佽姹備箣鍓嶅仛浜涗粈涔� return config; -- Gitblit v1.9.1