功能:同步小程序流程

This commit is contained in:
xiaowang
2026-05-23 18:45:41 +08:00
parent 844516988b
commit 30ae763e18
117 changed files with 8823 additions and 76 deletions
+16
View File
@@ -1,3 +1,7 @@
/**
* Purpose: STORAGE_KEYS supports storage.js by holding or executing the storage keys page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const STORAGE_KEYS = {
ACCESS_TOKEN: 'accessToken',
REFRESH_TOKEN: 'refreshToken',
@@ -7,6 +11,10 @@ const STORAGE_KEYS = {
DEVICE_ID: 'miniDeviceId'
}
/**
* Purpose: getStorage supports storage.js by holding or executing the get storage 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 getStorage(key, defaultValue) {
try {
const value = wx.getStorageSync(key)
@@ -16,10 +24,18 @@ function getStorage(key, defaultValue) {
}
}
/**
* Purpose: setStorage supports storage.js by holding or executing the set storage 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 setStorage(key, value) {
wx.setStorageSync(key, value)
}
/**
* Purpose: removeStorage supports storage.js by holding or executing the remove storage 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 removeStorage(key) {
wx.removeStorageSync(key)
}