|
|
|
@ -7,9 +7,6 @@ const $ = window.$;
|
|
|
|
|
const isDev = window.location.port == 3007;
|
|
|
|
|
export const TEST_HOST = "https://test-newweb.educoder.net"
|
|
|
|
|
export function getImageUrl(path) {
|
|
|
|
|
// https://www.educoder.net
|
|
|
|
|
// https://testbdweb.trustie.net
|
|
|
|
|
// const local = 'http://localhost:3000'
|
|
|
|
|
const local = 'https://test-newweb.educoder.net'
|
|
|
|
|
if (isDev) {
|
|
|
|
|
return `${local}/${path}`
|
|
|
|
@ -20,7 +17,6 @@ export function getImageUrl(path) {
|
|
|
|
|
export function setImagesUrl(path) {
|
|
|
|
|
const local = 'https://test-newweb.educoder.net'
|
|
|
|
|
let firstStr = path.substr(0, 1);
|
|
|
|
|
// console.log(firstStr);
|
|
|
|
|
if (firstStr == "/") {
|
|
|
|
|
return isDev ? `${local}${path}` : `${path}`;
|
|
|
|
|
} else {
|
|
|
|
@ -28,15 +24,7 @@ export function setImagesUrl(path){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function getUrl(path, goTest) {
|
|
|
|
|
// https://www.educoder.net
|
|
|
|
|
// https://testbdweb.trustie.net
|
|
|
|
|
|
|
|
|
|
// 如果想所有url定位到测试版,可以反注释掉下面这行
|
|
|
|
|
//goTest = true
|
|
|
|
|
// testbdweb.educoder.net testbdweb.trustie.net
|
|
|
|
|
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
|
|
|
|
|
// const local = 'https://testeduplus2.educoder.net'
|
|
|
|
|
export function getUrl(path) {
|
|
|
|
|
const local = 'https://test-newweb.educoder.net'
|
|
|
|
|
if (isDev) {
|
|
|
|
|
return `${local}${path ? path : ''}`
|
|
|
|
@ -79,13 +67,15 @@ let newtimestamp;
|
|
|
|
|
let checkSubmitFlgs = false;
|
|
|
|
|
function railsgettimess(proxy) {
|
|
|
|
|
if (checkSubmitFlgs === false) {
|
|
|
|
|
$.ajax({url:proxy,
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: proxy,
|
|
|
|
|
async: false, success: function (data) {
|
|
|
|
|
if (data.status === 0) {
|
|
|
|
|
newtimestamp = data.message;
|
|
|
|
|
checkSubmitFlgs = true;
|
|
|
|
|
}
|
|
|
|
|
}})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
window.setTimeout(function () {
|
|
|
|
|
checkSubmitFlgs = false;
|
|
|
|
|