2025/2/8第一次更新

This commit is contained in:
爱吃咸鱼小猫咪
2025-02-08 18:50:38 +08:00
commit d7af560866
26519 changed files with 5046029 additions and 0 deletions
@@ -0,0 +1,53 @@
// 本文件由FirstUI授权予佛山市航电梦联网络科技有限公司(会员ID:11 27,营业执照号: 91 4 40 60 5M A 55 6H1KXH)专用,请尊重知识产权,勿私下传播,违者追究法律责任。
/**
* 获取屏幕的宽高
*/
let windowWidth = 0
let windowHeight = 0
uni.getSystemInfo({
success(res) {
windowWidth = res.windowWidth
windowHeight = res.windowHeight
}
})
const getSystemInfo = () => {
return [ windowWidth, windowHeight ]
}
const bindInstance = () => {
let instance = {}
return {
/**
* 提供键名,绑定对象值
*/
set: (bindName, data = null) => {
if (!instance[bindName]) {
instance[bindName] = data
}
return instance[bindName] || {}
},
get: (bindName) => {
return instance[bindName] || {}
},
/**
* 清除实例对象的所有缓存值
*/
clear: () => {
instance = {}
},
/**
* 清楚实例对象特定的键
*/
remove: (bindName) => {
instance[bindName] && delete instance[bindName]
}
}
};
export default {
getSystemInfo,
cacheInstance: bindInstance(),
}