var wyWindow = window.open('_blank');
$http.post($rootScope.baseUrl + '/Interface0231A.ashx', {
userFId: fId
}).success(function (data) {
if(data.code === 0) {
//模拟登录获取临时密码成功
var tempPwd = data.msg;
wyWindow.location = emulateLoginUrl + '#/login?n=' + fId + '&p=' + tempPwd + '&isEm=1';
}else {
constantService.showSimpleToast('模拟登录失败!');
}
});
直接在异步回调里调window.open会被浏览器阻止,可以同步先打开窗口,在异步回调里跳转页面