处理url字符串拼接方法new URLSearchParams()
A系统
let data = { study_id: row.study_id, hospital_id: row.hospital_id, pageType: 'detail' };let params = new URLSearchParams();
for (let key in data) {
params.append(key, data[key]);
}
window.open(url + '?' + params.toString(), '_self');
B系统
let queryString = window.location.hash.split('?')[1];
let data = new URLSearchParams(queryString);
获取参数方式
let study_id = data.get('study_id')