From 522edde0855635cec4e6f1f55013fb1419f2715d Mon Sep 17 00:00:00 2001 From: wangcuijuan Date: Tue, 26 Nov 2024 16:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8E=89=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/platform/api/lifecycle/index.ali.js | 9 --------- .../api-proxy/src/platform/api/lifecycle/index.js | 7 ------- .../src/platform/api/lifecycle/index.web.js | 12 ------------ .../api-proxy/src/platform/api/system/index.web.js | 8 +++++++- packages/api-proxy/src/platform/index.js | 3 --- 5 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 packages/api-proxy/src/platform/api/lifecycle/index.ali.js delete mode 100644 packages/api-proxy/src/platform/api/lifecycle/index.js delete mode 100644 packages/api-proxy/src/platform/api/lifecycle/index.web.js 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'