var currentURL = window.location.href
// 移除token参数
var updatedURL = currentURL.replace(/[?&]token=([^&]*)/, '')
// 如果更新后的URL末尾是'?',则移除它
if (updatedURL.slice(-1) === '?') {
updatedURL = updatedURL.slice(0, -1)
}
// 使用replaceState方法将更新后的URL替换当前页面的URL
history.replaceState(null, null, updatedURL)