功能:重建指尖管理师规划系统

This commit is contained in:
xiaowang
2026-06-04 16:39:06 +08:00
parent 73483e7b0c
commit 677890f518
413 changed files with 9602 additions and 795 deletions
+28
View File
@@ -0,0 +1,28 @@
const { STORAGE_KEYS, getStorage, setStorage } = require('./storage')
/**
* Purpose: createDeviceId supports device.js by holding or executing the create device id page or API role.
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
*/
function createDeviceId() {
const randomText = Math.random().toString(36).slice(2, 10)
return `admin-mini-device-${Date.now()}-${randomText}`
}
/**
* Purpose: getDeviceId supports device.js by holding or executing the get device id page or API role.
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
*/
function getDeviceId() {
let value = getStorage(STORAGE_KEYS.DEVICE_ID, '')
if (value) {
return value
}
value = createDeviceId()
setStorage(STORAGE_KEYS.DEVICE_ID, value)
return value
}
module.exports = {
getDeviceId
}