Sorry, Page Not Found换 if (type === "link") { if (window.location.protocol == 'https:' && !!value) { value = value.replace(urlRegx, '$1https:$3$4' + _port + '$9'); }; if (pathObj.current_host === pathObj.back_host) { var host = reg.test(value) ? value.match(reg)[0] : null; if (value && pathObj.szseHosts.indexOf(host) > -1) { value = value.replace(pathObj.main_host, pathObj.back_host); } } return value; } // 背景图地址更换 if (type === "background") { var eleBg = document.querySelectorAll(value); for (var i = 0; i < eleBg.length; i++) { var href = eleBg[i].style.backgroundImage; if (window.location.protocol == 'https:' && !!href) { href = href.replace(urlRegx, '$1https:$3$4' + _port + '$9'); }; var host = reg.test(href) ? href.match(reg)[0] : null; if (href && pathObj.szseHosts.indexOf(host) > -1) { if (pathObj.current_host === pathObj.back_host) { href = href.replace(pathObj.main_host, pathObj.back_host); } eleBg[i].style.backgroundImage = href; } } } }