Skip to content

Commit

Permalink
fix(web): 修复mis跳转portal失败的问题 (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
tongchong authored Jul 10, 2024
1 parent 8463268 commit f609a5c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/neat-ants-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@scow/portal-web": patch
"@scow/mis-web": patch
---

修复 mis 跳转 portal 失败的问题
4 changes: 2 additions & 2 deletions apps/mis-web/src/layouts/BaseLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { DesktopOutlined, RobotOutlined } from "@ant-design/icons";
import { UiExtensionStore } from "@scow/lib-web/build/extensions/UiExtensionStore";
import { BaseLayout as LibBaseLayout } from "@scow/lib-web/build/layouts/base/BaseLayout";
import { HeaderNavbarLink } from "@scow/lib-web/build/layouts/base/header";
import { join } from "path";
import { PropsWithChildren, useMemo } from "react";
import { useStore } from "simstate";
import { LanguageSwitcher } from "src/components/LanguageSwitcher";
Expand All @@ -22,7 +23,6 @@ import { getAvailableRoutes } from "src/layouts/routes";
import { UserStore } from "src/stores/UserStore";
import { publicConfig } from "src/utils/config";


interface Props {
footerText: string;
versionTag: string | undefined;
Expand All @@ -44,7 +44,7 @@ export const BaseLayout =
const uiExtensionStore = useStore(UiExtensionStore);

const toCallbackPage = (url: string) => userStore.user
? `${url}/api/auth/callback?token=${userStore.user.token}`
? join(url,`/api/auth/callback?token=${userStore.user.token}`)
: url;

const navbarLinks: HeaderNavbarLink[] = [];
Expand Down
3 changes: 2 additions & 1 deletion apps/portal-web/src/layouts/BaseLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { RobotOutlined } from "@ant-design/icons";
import { UiExtensionStore } from "@scow/lib-web/build/extensions/UiExtensionStore";
import { BaseLayout as LibBaseLayout } from "@scow/lib-web/build/layouts/base/BaseLayout";
import { HeaderNavbarLink } from "@scow/lib-web/build/layouts/base/header";
import { join } from "path";
import { PropsWithChildren } from "react";
import { useStore } from "simstate";
import { LanguageSwitcher } from "src/components/LanguageSwitcher";
Expand Down Expand Up @@ -61,7 +62,7 @@ export const BaseLayout = ({ footerText, versionTag, initialLanguage, children }
};

const toCallbackPage = (url: string) => userStore.user
? `${url}/api/auth/callback?token=${userStore.user.token}`
? join(url,`/api/auth/callback?token=${userStore.user.token}`)
: url;

const navbarLinks: HeaderNavbarLink[] = [];
Expand Down

0 comments on commit f609a5c

Please sign in to comment.