1.第一种,常见的路由方式,采用a链接跳转
const a = document.createElement('a');
a.style.display = 'none';
// a.href = 'http://192.168.2.47:9781/client/app/#/login?&token=' + token_video;
a.href = 'http://116.63.181.162:9780/client/app/#/login?&token=' + token_video;
a.target = '_blank';
document.body.appendChild(a);
a.click();
2.第二种,resolve放法
const { href } = this.$router.resolve({
name: "router-name",
query: {
id: 1
}
});
window.open(href, '_blank');
3.第三种简单粗暴
直接window.open('跳转链接');