提交 3d2f57fd 编写于 作者: D DCloud_LXH

fix(app): deviceId is used plus module

上级 589151b5
let deviceId
export default function () {
deviceId = deviceId || plus.device.uuid
return deviceId
}
import { callApiSync } from '../util' import { callApiSync } from '../util'
import { getWindowInfo } from './get-window-info' import { getWindowInfo } from './get-window-info'
import deviceId from 'uni-platform/helpers/uuid'
import { sortObject } from 'uni-shared' import { sortObject } from 'uni-shared'
let systemInfo = {} let systemInfo = {}
...@@ -21,7 +20,8 @@ export function getDeviceInfo () { ...@@ -21,7 +20,8 @@ export function getDeviceInfo () {
weexGetSystemInfoSync() weexGetSystemInfoSync()
const { const {
deviceBrand = '', deviceModel, osName, deviceBrand = '', deviceModel, osName,
osVersion, deviceOrientation, deviceType osVersion, deviceOrientation, deviceType,
deviceId
} = systemInfo } = systemInfo
const brand = deviceBrand.toLowerCase() const brand = deviceBrand.toLowerCase()
...@@ -32,7 +32,7 @@ export function getDeviceInfo () { ...@@ -32,7 +32,7 @@ export function getDeviceInfo () {
deviceBrand: brand, deviceBrand: brand,
deviceModel, deviceModel,
devicePixelRatio: plus.screen.scale, devicePixelRatio: plus.screen.scale,
deviceId: deviceId(), deviceId,
deviceOrientation, deviceOrientation,
deviceType, deviceType,
model: deviceModel, model: deviceModel,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册