Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

文件passport.17173.com/partner/close中

win.Passport.sendMessage('openPlatformBind', {});
window.close();

改为:

var willClose= true;
try{
  win.Passport.sendMessage('openPlatformBind', {});
}
catch(ex){
  willClose = false;
  var crossDomainurl = "https://passport.17173.com/sso/allcrossdomain?do=login&domain=";
  var iframe = create('iframe',{'src':crossDomainurl, 'width':"0", 'height':"0"});
  setClass(iframe,'width:0px;height:0px');
  document.body.appendChild(iframe);
  setTimeout(function(){
    window.close();
  },2000);
}
willClose && window.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.