問題描述瀏覽器攔截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'
});
}
}
)你期待的結果是什么?實際看到的錯誤信息又是什么?如何處理?
如何解決瀏覽器攔截支付寶彈窗?要兼容safari
牛魔王的故事
2019-01-05 21:43:52