Files
soulspace/uni_modules/z-paging/components/z-paging/js/z-paging-config.js
2025-04-18 17:56:33 +08:00

33 lines
583 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// z-paging
// github地址:https://github.com/SmileZXLee/uni-z-paging
// dcloud地址:https://ext.dcloud.net.cn/plugin?id=3935
// 反馈QQ群790460711
// z-paging配置文件
let config = null;
let getedStorage = false;
const storageKey = 'Z-PAGING-CONFIG-STORAGE-KEY'
function setConfig(value) {
try {
uni.setStorageSync(storageKey, value);
} catch {}
}
function getConfig() {
try {
if (getedStorage) {
return config;
}
config = uni.getStorageSync(storageKey);
getedStorage = true;
} catch {
return null;
}
}
module.exports = {
setConfig,
getConfig
};