Files
synctv-weihang/hbuilder_app/common/device.js
2026-06-15 22:46:12 +08:00

9 lines
224 B
JavaScript

export function getDeviceId() {
let id = uni.getStorageSync('deviceId')
if (!id) {
id = 'dev_' + Math.random().toString(16).slice(2) + Date.now().toString(16)
uni.setStorageSync('deviceId', id)
}
return id
}