1 let winObj =window.open(url); 2 let loop = setInterval(function() { 3 if(winObj.closed) { 4 clearInterval(loop); 5 _this.setState({ 6 isLoading:false 7 }) 8 } 9 }, 1000);
监听新的窗口关闭,通过window返回的closed参数进行判断