// 获取当前页面的 URL 参数
var urlParams = new URLSearchParams(window.location.search);
// 判断是否存在 uid 参数
if (!urlParams.has('__uid')) {
// 如果不存在 uid 参数,则添加
var uid = '${__uid}';
// 添加 uid 参数
urlParams.append('__uid', uid);
// 将修改后的 URL 更新到当前页面
window.location.href = window.location.pathname + '?' +
urlParams.toString();
}
//拼接uid
var para = new URLSearchParams(window.location.search).get("__uid");
if (para == null || para === "null" || para === undefined || typeof (para) == "undefined") {
window.location.search = window.location.search + "&__uid=" + uid;
}