Commit 0fa4f6fb authored by wanghao's avatar wanghao

1 托盘 根据 业务调整 增加 序号字段。

2 托盘 提交绑定后,再提交绑定会 重复添加数据问题调整。
parent e25fd005
......@@ -126,11 +126,27 @@ export default {
this.selectedMenu = index;
},
goToAdmin() {
// 在新窗口打开,完全隔离当前环境
const baseUrl = window.location.origin;
const targetUrl = baseUrl + '/index?_t=' + Date.now();
window.open(targetUrl, '_blank');
// 方法1:使用完全不同的路径
const timestamp = Date.now();
const random = Math.random().toString(36).substring(2);
// 创建一个临时iframe来清理环境
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = '/cleanup.html?t=' + timestamp; // 创建一个简单的清理页面
iframe.onload = () => {
// 使用replaceState改变当前URL,然后跳转
window.history.replaceState(null, '', '/redirect?t=' + timestamp);
// 延迟跳转确保状态更新
setTimeout(() => {
// 使用assign而不是href,确保浏览器处理重定向
window.location.assign('/index?t=' + timestamp + '&r=' + random);
}, 50);
};
document.body.appendChild(iframe);
},
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment