From c089eb2398b5af3ce2009c14ca7bf26354b276bf Mon Sep 17 00:00:00 2001 From: harry Date: Tue, 24 Mar 2020 14:51:42 +0800 Subject: [PATCH] fix --- public/react/src/App.js | 4 +--- public/react/src/AppConfig.js | 34 ++--------------------------- public/react/src/common/educoder.js | 6 ----- 3 files changed, 3 insertions(+), 41 deletions(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 6abe54d28..1699ff6f6 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -17,14 +17,12 @@ import AccountProfile from "./modules/user/AccountProfile"; import Accountnewprofile from './modules/user/Accountnewprofile'; import Certifiedprofessional from './modules/modals/Certifiedprofessional'; import Loading from './Loading' -import { Loadable } from 'educoder'; - import moment from 'moment' import history from './history'; -import { SnackbarHOC } from 'educoder' +import { SnackbarHOC,Loadable } from 'educoder' import { initAxiosInterceptors } from './AppConfig' import { Provider } from 'react-redux'; import configureStore from './redux/stores/configureStore'; diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index f4c9b2bda..afed0fa9d 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -1,3 +1,5 @@ +import React from "react"; + import axios from 'axios'; import md5 from 'md5'; import { requestProxy } from "./indexEduplus2RequestProxy"; @@ -116,37 +118,8 @@ function railsgettimes(proxy) { } - clearAllCookie() - if (timestamp && checkSubmitFlg === false) { - $.ajax({ - url: proxy, async: false, success: function (data) { - if (data.status === 0) { - timestamp = data.message; - setpostcookie(); - } - } - }) - checkSubmitFlg = true - window.setTimeout(() => { - checkSubmitFlg = false; - }, 2000); - } else if (checkSubmitFlg === false) { - $.ajax({ - url: proxy, async: false, success: function (data) { - if (data.status === 0) { - timestamp = data.message; - setpostcookie(); - } - } - }) - checkSubmitFlg = true - window.setTimeout(() => { - checkSubmitFlg = false; - }, 2000); - } -} window._debugType = debugType; @@ -381,9 +354,6 @@ export function initAxiosInterceptors(props) { }, 2000); } - if (response.data.status === 500) { - locationurl('/500'); - } // if (response.data.status === 402) { // console.log(response.data.status); diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 64691ae58..0ba550252 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -19,12 +19,6 @@ export { updatePageParams as updatePageParams } from './RouterUtil'; export { bytesToSize as bytesToSize } from './UnitUtil'; -export { - markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension, - downloadFile, sortDirections -} from './TextUtil' -export { handleDateString, getNextHalfHourOfMoment, formatDuring } from './DateUtil' - export { markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension, downloadFile, sortDirections } from './TextUtil' export { handleDateString, getNextHalfHourOfMoment,formatDuring,formatSeconds} from './DateUtil'