调整访问地址

dev_hs
杨树林 5 years ago
parent a4023e9931
commit 8537133072

@ -42,9 +42,9 @@ export function initAxiosInterceptors(props) {
// proxy = "http://testbdweb.trustie.net" // proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net" // proxy = "http://testbdweb.educoder.net"
// proxy = "https://testeduplus2.educoder.net" // proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080" proxy="https://pre-newweb.educoder.net"
// wy // wy
// proxy="http://192.168.2.63:3001" // proxy="http://192.168.2.63:3001"

@ -1,10 +1,10 @@
const isDev = window.location.port == 3007; 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) { export function getImageUrl(path) {
// https://www.educoder.net // https://www.educoder.net
// https://testbdweb.trustie.net // https://testbdweb.trustie.net
// const local = 'http://localhost:3000' // const local = 'http://localhost:3000'
const local = 'http://47.96.87.25:48080' const local = 'https://pre-newweb.educoder.net'
if (isDev) { if (isDev) {
return `${local}/${path}` return `${local}/${path}`
} }
@ -12,7 +12,7 @@ export function getImageUrl(path) {
} }
export function setImagesUrl(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); let firstStr=path.substr(0,1);
// console.log(firstStr); // console.log(firstStr);
if(firstStr=="/"){ if(firstStr=="/"){
@ -31,7 +31,7 @@ export function getUrl(path, goTest) {
// testbdweb.educoder.net testbdweb.trustie.net // testbdweb.educoder.net testbdweb.trustie.net
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000' // const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
// const local = 'https://testeduplus2.educoder.net' // const local = 'https://testeduplus2.educoder.net'
const local = 'http://47.96.87.25:48080' const local = 'https://pre-newweb.educoder.net'
if (isDev) { if (isDev) {
return `${local}${path?path:''}` return `${local}${path?path:''}`
} }

@ -174,7 +174,7 @@ class TPIContextProvider extends Component {
} }
let testPath = '' let testPath = ''
if (window.location.port == 3007) { 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/v1/games/${ game.identifier }/cost_time`
var url = `${testPath}/api/tasks/${ game.identifier }/cost_time` var url = `${testPath}/api/tasks/${ game.identifier }/cost_time`

@ -78,10 +78,13 @@ class PollNew extends Component {
changeTopicName = (e) => { changeTopicName = (e) => {
console.log("调用了changeTopicName"); console.log("调用了changeTopicName");
let num = 60 - parseInt(e.target.value.length); let num = parseInt(e.target.value.length);
if(num>60){
return;
}
this.setState({ this.setState({
addonAfter: num < 0 ? 0 : num addonAfter: num < 0 ? 0 : num
}) });
this.setState({ this.setState({
polls_nametest: e.target.value polls_nametest: e.target.value
}) })
@ -252,7 +255,7 @@ class PollNew extends Component {
if(result.data){ if(result.data){
if(result.data.poll){ if(result.data.poll){
if(result.data.poll.polls_name){ 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({ this.setState({
addonAfter: num < 0 ? 0 : num addonAfter: num < 0 ? 0 : num
}) })

@ -46,7 +46,7 @@ function loadMonacoResouce(callback) {
prefix = '' prefix = ''
} else { } else {
// _url_origin = `https://testeduplus2.educoder.net/`; // _url_origin = `https://testeduplus2.educoder.net/`;
_url_origin = 'http://47.96.87.25:48080'; _url_origin = 'https://pre-newweb.educoder.net';
} }
const $ = window.$; const $ = window.$;

@ -23,7 +23,7 @@ const versionNum = '0001';
// let _url_origin = getUrl() // let _url_origin = getUrl()
let _url_origin=''; let _url_origin='';
if(window.location.port === "3007"){ 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`; // let _url_origin=`https://www.educoder.net`;

Loading…
Cancel
Save