Ie浏览器下,有时候获取到的window.location.origin为undefined,需要兼容
let origin: any; if (!window.location.origin) { origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : ''); } else { origin = window.location.origin; }