// 美国科技智库
import router from "@/router/index";
// 跳转智库详情
export const goToThinkTank = (id, tabName) => {
  window.sessionStorage.setItem("curTabName", tabName);
  const base64 = btoa(encodeURIComponent(id));
  const curRoute = router.resolve({
    name: "ThinkTankDetail",
    params: {
      id: base64
    }
  });
  window.open(curRoute.href, "_blank");
}

// 跳转智库报告详情
export const goToThinkTankReport = (id, tabName) => {
  window.sessionStorage.setItem("curTabName", tabName);
  const route = router.resolve({
    name: "ReportDetail",
    params: {
      id: id
    }
  });
  window.open(route.href, "_blank");
}