diff --git a/packages/uni-app-harmony/src/service/api/base/getBaseSystemInfo.ts b/packages/uni-app-harmony/src/service/api/base/getBaseSystemInfo.ts index 093643a35e849235383480baa45db8c95dcec0c8..abf85b889e65a19ff430aa08c2c2179508e044dc 100644 --- a/packages/uni-app-harmony/src/service/api/base/getBaseSystemInfo.ts +++ b/packages/uni-app-harmony/src/service/api/base/getBaseSystemInfo.ts @@ -6,11 +6,13 @@ declare function lpx2px(value: number): number * @returns */ export function getBaseSystemInfo() { - const plus = weex.requireModule('plus') + // @ts-expect-error view 层 + if (typeof __SYSTEM_INFO__ !== 'undefined') { + return (window as any).__SYSTEM_INFO__ + } return { platform: 'harmony', pixelRatio: vp2px(1), windowWidth: lpx2px(720), // TODO designWidth可配置 - language: plus.getLanguage(), } }