1,获取链接上的参数
getQueryString = (name, search) => { search = search || window.location.search.substr(1) || window.location.hash.split("?")[1]; let reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); let r = search.match(reg); if (r != null) return unescape(r[2]); return null; }