解决方案:登录页面的js中加上如下代码:if(window !=top){ top.location.href = location.href; }即可完美解决问题。参考:https://www.cnblogs.com/pijiaxiang/p/5320073.html