下面这种解析url
路径跳转在很多机上的ie11
浏览器上测试都ok
但在有一台ie11
浏览器上解析会有问题
比如这个地址http://www.abc.com/m/tt/132
在个别机上的ie
浏览器下会成http://www.abc.com/m/tt/undefined/m/tt/132
好生奇怪为什么会解析成这样?
let pathname = window.location.pathname;
let href = window.location.origin;
if(/^\/m\//.test(pathname)){
pathname = pathname.replace(/\/m/,'');
window.location.href = href + pathname;
}