统一甲屿云命名体系

This commit is contained in:
2026-06-29 23:26:43 +08:00
parent 48c47fe3ff
commit bc8a7d8d4c
1268 changed files with 3477 additions and 3511 deletions
@@ -0,0 +1,40 @@
/**
* Purpose: ensureStore supports page-state.js by holding or executing the ensure store 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 ensureStore() {
const app = getApp()
app.globalData.pageDirtyFlags = app.globalData.pageDirtyFlags || {}
return app.globalData.pageDirtyFlags
}
/**
* Purpose: markDirty supports page-state.js by holding or executing the mark dirty 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 markDirty(key) {
if (!key) {
return
}
const store = ensureStore()
store[key] = true
}
/**
* Purpose: consumeDirty supports page-state.js by holding or executing the consume dirty 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 consumeDirty(key) {
if (!key) {
return false
}
const store = ensureStore()
const value = Boolean(store[key])
delete store[key]
return value
}
module.exports = {
markDirty,
consumeDirty
}