网址获取某一参数
2020-11-20 本文已影响0人
念念碎平安夜
CommonUtils.getQueryString = (name) = > {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
let r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURI(r[2]);
return null;
};