Commit 3b23acae5ec55287e82fa1df22a18cef4217c113
Merge branch 'fix/data-view-embed' into 'main_dev'
fix: 修复大屏内嵌组态,公开大屏未携带公开的大屏token See merge request yunteng/thingskit-scada!190
Showing
3 changed files
with
5 additions
and
3 deletions
@@ -11,7 +11,8 @@ import { MessageEnum } from '@/enums/messageEnum' | @@ -11,7 +11,8 @@ import { MessageEnum } from '@/enums/messageEnum' | ||
11 | 11 | ||
12 | export function useContentData() { | 12 | export function useContentData() { |
13 | const contentDataStore = useContentDataStoreWithOut() | 13 | const contentDataStore = useContentDataStoreWithOut() |
14 | - const { mode, publicId, configurationId, userId } = useParseParams() | 14 | + const params = useParseParams() |
15 | + const { mode, publicId, configurationId, userId } = params | ||
15 | const userStore = useUserStoreWithOut() | 16 | const userStore = useUserStoreWithOut() |
16 | const { createMessage } = useMessage() | 17 | const { createMessage } = useMessage() |
17 | 18 |
@@ -8,6 +8,7 @@ interface HashParams { | @@ -8,6 +8,7 @@ interface HashParams { | ||
8 | platform?: PlatformEnum | 8 | platform?: PlatformEnum |
9 | publicId?: string | 9 | publicId?: string |
10 | userId?: string | 10 | userId?: string |
11 | + parentPageIsPublic?: boolean | ||
11 | } | 12 | } |
12 | 13 | ||
13 | export function useParseParams(): HashParams { | 14 | export function useParseParams(): HashParams { |
@@ -52,6 +52,6 @@ export function isDesignMode(): boolean { | @@ -52,6 +52,6 @@ export function isDesignMode(): boolean { | ||
52 | } | 52 | } |
53 | 53 | ||
54 | export function isShareMode(): boolean { | 54 | export function isShareMode(): boolean { |
55 | - const { mode } = useParseParams() | ||
56 | - return mode === PageModeEnum.SHARE | 55 | + const { mode, parentPageIsPublic } = useParseParams() |
56 | + return mode === PageModeEnum.SHARE || !!parentPageIsPublic | ||
57 | } | 57 | } |