From 219842be69e8edc52314bd56b3c5339d6a296c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Mon, 18 Dec 2023 13:57:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B7=E6=B1=82=E5=BC=82=E6=AD=A5=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E9=A1=B5=E9=9D=A2=E8=B7=B3=E8=BD=AC=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppConfig.js | 25 ++++++++++++------------- src/forge/Wiki/Index.jsx | 1 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index 5c5b188a5..c246ad013 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -43,19 +43,18 @@ export function initAxiosInterceptors(props) { requestProxy(config); let url = `/api${config.url}`; - // if (`${config[0]}` !== `true`) { - // if (window.location.port === "3007") { - // config.url = `${proxy}${url}`; - // if (config.url.indexOf('?') === -1) { - // config.url = `${config.url}`; - // } else { - // config.url = `${config.url}`; - // } - // } else { - // config.url = url; - // } - // } - config.url = url; + if (`${config[0]}` !== `true`) { + if (window.location.port === "3007") { + config.url = `${proxy}${url}`; + if (config.url.indexOf('?') === -1) { + config.url = `${config.url}?debug=${debugType}`; + } else { + config.url = `${config.url}&debug=${debugType}`; + } + } else { + config.url = url; + } + } config.withCredentials = false; return config; }, diff --git a/src/forge/Wiki/Index.jsx b/src/forge/Wiki/Index.jsx index a848145dc..388e80d31 100644 --- a/src/forge/Wiki/Index.jsx +++ b/src/forge/Wiki/Index.jsx @@ -101,6 +101,7 @@ export default (props) => { ...firstWiki, key: firstWikiNode.key }) + if(window.location.pathname.indexOf('/wiki') === -1) return history.push(`/${owner}/${projectsId}/wiki/${title}/${firstWikiNode.key}`); } else { setFileArr([]);