有没有办法在axios中使用window.open
?
这是代码...
axios.post( process.env.baseApi + '/pay-with-credit-card', {
})
.then(res => {
//I need to open a new window here....
window.open('www.yahoo.com')
})
如您所见,window.open
在.then()
内不起作用,但是如果我将其放在外面,则可以。