通过下面方法就可以获取url参数
const _getQueryString = (name) => {
let reg = new RegExp('[?&]' + name + '=([^&#]*)', 'i');
let res = window.location.href.match(reg);
if (res && res.length > 1) {
return decodeURIComponent(res[1]);
}
return '';
};