浏览器拦截window.open()方法
使用先打开一个弹窗,然后修改地址。依然被拦截。
// 请把代码文本粘贴到下方(请勿用图片代替代码)
const newWin = window.open();
debugger
let alipayURL = this.payURL; this.$axios.get(alipayURL, {
params:{
orderId: this.alipayOrderId, //订单Id
}
}).then(
(res) => { if(res.data.status == 200){ //返回参数
let routerData = this.$router.resolve({path:'/alipay',query:{htmls:res.data.data.page_html}});
newWin.location.replace = routerData.href;
}else{ this.$message({
message: '订单状态错误',
type: 'warning'
});
}
}
)如何处理?
相关分类