|
@@ -13,10 +13,12 @@ export function GetInWhichContainer() {
|
|
const InWhichContainer = GetInWhichContainer()
|
|
const InWhichContainer = GetInWhichContainer()
|
|
|
|
|
|
// in-iframe 当前页面在 iframe 中打开
|
|
// in-iframe 当前页面在 iframe 中打开
|
|
-const isInIframe = window.frames.length > 0
|
|
|
|
|
|
+const isInIframe = window.top !== window.self
|
|
|
|
+
|
|
|
|
+const inApp = InWhichContainer === 'in-app' || window.self.location.pathname.includes('page_workDesktop')
|
|
|
|
|
|
export const InContainer = {
|
|
export const InContainer = {
|
|
- inApp: InWhichContainer === 'in-app',
|
|
|
|
- inWeb: InWhichContainer === 'in-web',
|
|
|
|
|
|
+ inApp,
|
|
|
|
+ inWeb: !inApp && !isInIframe,
|
|
inIframe: isInIframe
|
|
inIframe: isInIframe
|
|
}
|
|
}
|