diff --git a/packages/api-proxy/src/platform/api/lifecycle/index.ali.js b/packages/api-proxy/src/platform/api/lifecycle/index.ali.js deleted file mode 100644 index 65c02ada23..0000000000 --- a/packages/api-proxy/src/platform/api/lifecycle/index.ali.js +++ /dev/null @@ -1,9 +0,0 @@ -import { ENV_OBJ } from '../../../common/js' - -function getEnterOptionsSync () { - return ENV_OBJ.getEnterOptionsSync() -} - -export { - getEnterOptionsSync -} diff --git a/packages/api-proxy/src/platform/api/lifecycle/index.js b/packages/api-proxy/src/platform/api/lifecycle/index.js deleted file mode 100644 index 267e826330..0000000000 --- a/packages/api-proxy/src/platform/api/lifecycle/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { ENV_OBJ, envError } from '../../../common/js' - -const getEnterOptionsSync = ENV_OBJ.getEnterOptionsSync || envError('getEnterOptionsSync') - -export { - getEnterOptionsSync -} diff --git a/packages/api-proxy/src/platform/api/lifecycle/index.web.js b/packages/api-proxy/src/platform/api/lifecycle/index.web.js deleted file mode 100644 index c4eaf200a7..0000000000 --- a/packages/api-proxy/src/platform/api/lifecycle/index.web.js +++ /dev/null @@ -1,12 +0,0 @@ -import { isBrowser, throwSSRWarning } from '../../../common/js' -function getEnterOptionsSync () { - if (!isBrowser) { - throwSSRWarning('getEnterOptionsSync API is running in non browser environments') - return - } - return global.__mpxEnterOptions || {} -} - -export { - getEnterOptionsSync -} diff --git a/packages/api-proxy/src/platform/api/system/index.web.js b/packages/api-proxy/src/platform/api/system/index.web.js index 90dd307c0d..31513048b6 100644 --- a/packages/api-proxy/src/platform/api/system/index.web.js +++ b/packages/api-proxy/src/platform/api/system/index.web.js @@ -128,7 +128,13 @@ function getSystemInfo (options = {}) { const getLaunchOptionsSync = envError('getLaunchOptionsSync') -const getEnterOptionsSync = envError('getEnterOptionsSync') +function getEnterOptionsSync () { + if (!isBrowser) { + throwSSRWarning('getEnterOptionsSync API is running in non browser environments') + return + } + return global.__mpxEnterOptions || {} +} export { getSystemInfo, diff --git a/packages/api-proxy/src/platform/index.js b/packages/api-proxy/src/platform/index.js index f900791e64..dda41337d6 100644 --- a/packages/api-proxy/src/platform/index.js +++ b/packages/api-proxy/src/platform/index.js @@ -105,9 +105,6 @@ export * from './api/video' // onWindowResize, offWindowResize export * from './api/window' -// getEnterOptionsSync -export * from './api/lifecycle' - // getLocation, openLocation, chooseLocation export * from './api/location'