打开一个新的窗口
window.open(`#/suspicious-count?id=${data.yhkh}&score=${data.score}&tags=${data.labels}`
获取参数 this.$route.query.tags
var afterUrl = window.location.search.substring(1)
var afterEqual = afterUrl.substring(afterUrl.indexof('=')+1).toUpperCase()
在本页面打开
替换原页面:
window.location.href="";
两个html之间传递参数 解析乱码
a页面
window.open('http://192.168.1.1:8000/Hqyfbcxmx.html?dicRegion=' + encodeURI(params.name))
b页面
decodeURI(window.location.search.substring(11)) + '市'
页面title
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/6571f64e720be3d632c0998eee6e143d.png)
document.title = '反洗钱监测预警'
获取url参数
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
}
return '';
}
var shopId = getQueryString("shopId");