diff --git a/packages/uni-app-plus/src/helpers/uuid.ts b/packages/uni-app-plus/src/helpers/uuid.ts deleted file mode 100644 index 4699cf64dbef2d728b11cabd8d22324527af335d..0000000000000000000000000000000000000000 --- a/packages/uni-app-plus/src/helpers/uuid.ts +++ /dev/null @@ -1,6 +0,0 @@ -let deviceId: string - -export default function () { - deviceId = deviceId || plus.device.uuid! - return deviceId -} 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 e105425cb2119067d00de84316cf691df77d5e88..42e5bb60f803d6155a9f744c608cfcc21c6e2a11 100644 --- a/packages/uni-app-plus/src/service/api/device/systemInfo.ts +++ b/packages/uni-app-plus/src/service/api/device/systemInfo.ts @@ -1,5 +1,4 @@ import { defineAsyncApi, defineSyncApi, getLocale } from '@dcloudio/uni-api' -import deviceId from '../../../helpers/uuid' import { extend, isString } from '@vue/shared' import { getWindowInfo } from './getWindowInfo' import { sortObject } from '@dcloudio/uni-shared' @@ -29,6 +28,7 @@ export const getDeviceInfo = defineSyncApi( osVersion, deviceOrientation, deviceType, + deviceId, } = systemInfo const brand = deviceBrand.toLowerCase() @@ -39,7 +39,7 @@ export const getDeviceInfo = defineSyncApi( deviceBrand: brand, deviceModel, devicePixelRatio: plus.screen.scale!, - deviceId: deviceId(), + deviceId, deviceOrientation, deviceType, model: deviceModel,