抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >
s/global.ejs volantis.pjax.method.send.start(); }); document.addEventListener('pjax:complete', function () { // 降级控制检测 performanceMonitor.check() // 这里的 script 不需要保证每个页面都含有相同的数目 document.querySelectorAll('script[data-pjax], .pjax-reload script').forEach(e=>{ const code = e.text || e.textContent || e.innerHTML || ''; const script = document.createElement('script'); Object.keys(e.attributes).forEach(i=>{ script.setAttribute(e.attributes[i].nodeName,e.attributes[i].nodeValue) }) if (code) { script.appendChild(document.createTextNode(code)); } e.parentNode.replaceChild(script, e); }); // 使用 volantis.pjax.push 方法传入重载函数 参见layout/_partial/scripts/global.ejs volantis.pjax.method.complete.start(); }); document.addEventListener('pjax:error', function (e) { if(volantis.debug === "pjax") { console.error(e); console.log('pjax error: \n' + JSON.stringify(e)); }else{ // 使用 volantis.pjax.error 方法传入pjax:error回调函数 参见layout/_partial/scripts/global.ejs volantis.pjax.method.error.start(); window.location.href = e.triggerElement.href; } });