let hr = window.location.href;
window.location.href = hr.split("?")[0];

注意:一定要加结束条件,否则页面一直处于刷新循环!