请求异步导致页面跳转异常
This commit is contained in:
parent
42975ca188
commit
219842be69
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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([]);
|
||||
|
|
|
|||
Loading…
Reference in New Issue