diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index dba12e81b..a3a51ddd7 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,9 +42,9 @@ export function initAxiosInterceptors(props) { // proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.educoder.net" // proxy = "https://testeduplus2.educoder.net" - proxy="http://47.96.87.25:48080" - - // wy + proxy="https://pre-newweb.educoder.net" + + // wy // proxy="http://192.168.2.63:3001" diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index fc2100694..12505186a 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -1,10 +1,10 @@ const isDev = window.location.port == 3007; -export const TEST_HOST = "http://47.96.87.25:48080" +export const TEST_HOST = "https://pre-newweb.educoder.net" export function getImageUrl(path) { // https://www.educoder.net // https://testbdweb.trustie.net // const local = 'http://localhost:3000' - const local = 'http://47.96.87.25:48080' + const local = 'https://pre-newweb.educoder.net' if (isDev) { return `${local}/${path}` } @@ -12,7 +12,7 @@ export function getImageUrl(path) { } export function setImagesUrl(path){ - const local = 'http://47.96.87.25:48080' + const local = 'https://pre-newweb.educoder.net' let firstStr=path.substr(0,1); // console.log(firstStr); if(firstStr=="/"){ @@ -31,7 +31,7 @@ export function getUrl(path, goTest) { // testbdweb.educoder.net testbdweb.trustie.net // const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000' // const local = 'https://testeduplus2.educoder.net' - const local = 'http://47.96.87.25:48080' + const local = 'https://pre-newweb.educoder.net' if (isDev) { return `${local}${path?path:''}` } diff --git a/public/react/src/context/TPIContextProvider.js b/public/react/src/context/TPIContextProvider.js index 724f8bc11..998d58580 100644 --- a/public/react/src/context/TPIContextProvider.js +++ b/public/react/src/context/TPIContextProvider.js @@ -174,7 +174,7 @@ class TPIContextProvider extends Component { } let testPath = '' if (window.location.port == 3007) { - testPath = 'http://47.96.87.25:48080' + testPath = 'https://pre-newweb.educoder.net' } // var url = `${testPath}/api/v1/games/${ game.identifier }/cost_time` var url = `${testPath}/api/tasks/${ game.identifier }/cost_time` diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js index faa736ef2..07936cb82 100644 --- a/public/react/src/modules/courses/poll/PollNew.js +++ b/public/react/src/modules/courses/poll/PollNew.js @@ -78,10 +78,13 @@ class PollNew extends Component { changeTopicName = (e) => { console.log("调用了changeTopicName"); - let num = 60 - parseInt(e.target.value.length); + let num = parseInt(e.target.value.length); + if(num>60){ + return; + } this.setState({ addonAfter: num < 0 ? 0 : num - }) + }); this.setState({ polls_nametest: e.target.value }) @@ -252,7 +255,7 @@ class PollNew extends Component { if(result.data){ if(result.data.poll){ if(result.data.poll.polls_name){ - let num = 60 - parseInt(result.data.poll.polls_name.length); + let num = parseInt(result.data.poll.polls_name.length); this.setState({ addonAfter: num < 0 ? 0 : num }) diff --git a/public/react/src/modules/page/component/monaco/TPIMonaco.js b/public/react/src/modules/page/component/monaco/TPIMonaco.js index 26f020586..ee19e483d 100644 --- a/public/react/src/modules/page/component/monaco/TPIMonaco.js +++ b/public/react/src/modules/page/component/monaco/TPIMonaco.js @@ -46,7 +46,7 @@ function loadMonacoResouce(callback) { prefix = '' } else { // _url_origin = `https://testeduplus2.educoder.net/`; - _url_origin = 'http://47.96.87.25:48080'; + _url_origin = 'https://pre-newweb.educoder.net'; } const $ = window.$; diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 2d6bedf18..68abb52e1 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -23,7 +23,7 @@ const versionNum = '0001'; // let _url_origin = getUrl() let _url_origin=''; if(window.location.port === "3007"){ - _url_origin="http://47.96.87.25:48080"; + _url_origin="https://pre-newweb.educoder.net"; } // let _url_origin=`https://www.educoder.net`;