linwe
2024-08-08 3c738f4fe2762bba8087e5a22fc0dc06560eab0e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// [z-paging]处理main.js中的配置信息工具
 
let config = null;
let getedStorage = false;
const storageKey = 'Z-PAGING-CONFIG-STORAGE-KEY'
 
function setConfig(value) {
    uni.setStorageSync(storageKey, value);
}
 
function getConfig() {
    if (getedStorage) return config;
    config = uni.getStorageSync(storageKey);
    getedStorage = true;
    return config;
}
 
export default {
    setConfig,
    getConfig
};