1、localhost和127.0.0.1产生的session是不同的。 2、window.location.href的页面session会失效。 解决方案: location.href页面路径携带当前页面上的session_id