if (window.location.href != "链接") {
  window.location.href = "链接";
};