diff --git a/packages/uni-app-plus/src/service/api/device/systemInfo.ts b/packages/uni-app-plus/src/service/api/device/systemInfo.ts index 26ba2971a30c783bfecb352b6a9f2e93eb8510c4..363a99536922f542783930c9eaa6b65028414f7b 100644 --- a/packages/uni-app-plus/src/service/api/device/systemInfo.ts +++ b/packages/uni-app-plus/src/service/api/device/systemInfo.ts @@ -11,6 +11,11 @@ function weexGetSystemInfoSync() { if (!_initSystemInfo) return const { getSystemInfoSync } = weex.requireModule('plus') systemInfo = getSystemInfoSync() + if (typeof systemInfo === 'string') { + try { + systemInfo = JSON.parse(systemInfo) + } catch (error) {} + } } export const getDeviceInfo = defineSyncApi(