diff --git a/src/AppConfig.js b/src/AppConfig.js index a6200dbba..8b65e2528 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -1,12 +1,9 @@ import axios from 'axios'; import { requestProxy } from "./indexEduplus2RequestProxy"; -import { broadcastChannelOnmessage , isDev, queryString } from 'educoder'; +import { broadcastChannelOnmessage, isDev, queryString } from 'educoder'; import { notification } from 'antd'; import cookie from 'react-cookies'; import './index.css'; -const $ = window.$; -let timestamp; -let checkSubmitFlg = false; let message501 = false; broadcastChannelOnmessage('refreshPage', () => { @@ -63,9 +60,9 @@ window._debugType = debugType; export function initAxiosInterceptors(props) { initOnlineOfflineListener() // TODO 避免重复的请求 https://github.com/axios/axios#cancellation - var - // proxy = "http://localhost:3000" - proxy = "https://testforgeplus.trustie.net" + var + // proxy = "http://localhost:3000" + proxy = "https://testforgeplus.trustie.net" const requestMap = {}; window.setfalseInRequestMap = function (keyName) { @@ -109,12 +106,10 @@ export function initAxiosInterceptors(props) { }); axios.interceptors.response.use(function (response) { - - // console.log(".............") if (response === undefined) { return } - const config = response.config + const config = response.config; if (response.data.status === -1) { if (window.location.pathname.startsWith('/tasks/')) { props.showSnackbar(response.data.message || '服务器异常,请联系管理员。') @@ -127,12 +122,10 @@ export function initAxiosInterceptors(props) { }, }); } - throw new axios.Cancel('Operation canceled by the user.'); } if (response.data.status === 403 || response.data.status === "403") { - locationurl('/403'); } @@ -159,8 +152,6 @@ export function initAxiosInterceptors(props) { message501 = false }, 2000); } - - requestMap[response.config.url] = false; setpostcookie(); return response; diff --git a/src/forge/DevOps/Dispose.jsx b/src/forge/DevOps/Dispose.jsx index b03492872..04f3558cb 100644 --- a/src/forge/DevOps/Dispose.jsx +++ b/src/forge/DevOps/Dispose.jsx @@ -13,7 +13,6 @@ function Dispose(props){ const [ visible , setVisible ] = useState(false); const [ ymlValue , setYmlValue ] = useState(""); const [ sha , setSha ] = useState(undefined); - const [ six , setSix ] = useState(undefined); const [ fileLanguage , setFileLanguage ] = useState(undefined); const [ first , setFirst ] = useState(false);