Merge pull request '工具函数兼容报错' (#323) from tongChong/forgeplus-react:feature_jk_homepage into pre_dev_military

This commit is contained in:
xxq250 2021-12-17 16:11:13 +08:00
commit af490fbc0c
1 changed files with 54 additions and 52 deletions

View File

@ -24,7 +24,7 @@ export function getImage(path) {
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'http://39.105.176.215:49999';
if(path.indexOf("http://")===-1){
if (path&&path.indexOf("http://") === -1) {
if (isDev) {
return `${local}/images/${path}`
}
@ -39,7 +39,7 @@ export function getTestImage(path) {
// https://testbdweb.trustie.net
// const local = 'http://localhost:3000'
const local = 'http://117.50.100.12:49999';
if(path.indexOf("http://")===-1){
if (path && path.indexOf("http://") === -1) {
if (isDev) {
return `${local}${path}`
}
@ -160,13 +160,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;