当检测到缺少参数时,立即跳转至首页
<script>
(function() {
const urlParams = new URLSearchParams(window.location.search);
if (!urlParams.get('ext_zsbh') || !urlParams.get('ext_sfzh')) {
console.warn('缺少必要参数,正在跳转至首页');
window.location.href = "/";
}
})();
</script>
