diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 4de5d9d88..be734a82e 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -22,14 +22,14 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : - window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' + const _search = window.location.search; + let parsed = {}; + if (_search) { + parsed = queryString.parse(_search); + } + debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : + window.location.search.indexOf('debug=s') != -1 ? 'student' : + window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { @@ -83,9 +83,9 @@ export function initAxiosInterceptors(props) { } config.url = `${proxy}${url}`; if (config.url.indexOf('?') == -1) { - config.url = `${config.url}?debug=${'student'}` + config.url = `${config.url}?debug=${'admin'}` } else { - config.url = `${config.url}&debug=${'student'}` + config.url = `${config.url}&debug=${'admin'}` } } else { // 加api前缀