点击按钮跳转链接是修改链接后面的参数

例如:www.baidu.com?currentOrgId=1;动态替换currentOrgId等于的值

const getCurrentOrgId = (item, index) => {
  netWorkActive.value = index
  const url = new URL(window.location.href)
  url.searchParams.set('currentOrgId', item.orgId)
  window.location.href = url.toString()
}

 

posted @ 2026-07-23 15:45  隐居青楼  阅读(4)  评论(0)    收藏  举报