|
|
@ -2,7 +2,7 @@ import React from "react";
|
|
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import { requestProxy } from "./indexEduplus2RequestProxy";
|
|
|
|
import { requestProxy } from "./indexEduplus2RequestProxy";
|
|
|
|
import { broadcastChannelOnmessage ,SetAppModel} from 'educoder';
|
|
|
|
import { broadcastChannelOnmessage ,SetAppModel, isDev, queryString } from 'educoder';
|
|
|
|
import { notification } from 'antd';
|
|
|
|
import { notification } from 'antd';
|
|
|
|
import './index.css'
|
|
|
|
import './index.css'
|
|
|
|
broadcastChannelOnmessage('refreshPage', () => {
|
|
|
|
broadcastChannelOnmessage('refreshPage', () => {
|
|
|
@ -18,10 +18,18 @@ function locationurl(list){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO 开发期多个身份切换
|
|
|
|
// TODO 开发期多个身份切换
|
|
|
|
const debugType =""
|
|
|
|
let debugType =""
|
|
|
|
// window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
|
|
|
|
if (isDev) {
|
|
|
|
// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
|
|
|
|
const _search = window.location.search;
|
|
|
|
// window._debugType = debugType;
|
|
|
|
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 || ''
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
window._debugType = debugType;
|
|
|
|
export function initAxiosInterceptors(props) {
|
|
|
|
export function initAxiosInterceptors(props) {
|
|
|
|
|
|
|
|
|
|
|
|
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
|
|
|
|
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation
|
|
|
|