From a0af31b2455869f5e654a58312eac490e2a10300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 19 Dec 2019 16:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=89=88=E5=AD=A6=E9=99=A2=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index c51c0d5e1..ac39562a7 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -19,25 +19,25 @@ function locationurl(list){ 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' -// } -// // 超管 -// // debugType="admin"; -// // 老师 -// //ebugType="teacher"; -// // 学生 -// // debugType="student"; -// -// window._debugType = debugType; +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' +} +// 超管 +// debugType="admin"; +// 老师 +//ebugType="teacher"; +// 学生 +// debugType="student"; + +window._debugType = debugType; export function initAxiosInterceptors(props) { initOnlineOfflineListener()