zhangzengfei
2021-06-07 e23a219e6e6056f6da5405881768a90c39097933
1
2
3
4
5
6
7
8
export function getDeviceUUID() {
    let deviceId = uni.getStorageSync('uni_deviceId') ||
        uni.getSystemInfoSync().deviceId ||
        uni.getSystemInfoSync().system + '_' + Math.random().toString(36).substr(2);
 
    uni.setStorageSync('uni_deviceId', deviceId)
    return deviceId;
}