清除缓存
onLaunch: function () {
console.log('App Launch')
const preservedKeys = ['ishowFixPre', 'readTime']
try {
const { keys } = uni.getStorageInfoSync()
keys.forEach((key) => {
// 如果键不在保留键数组中,则删除存储项
if (!preservedKeys.includes(key)) {
uni.removeStorageSync(key)
}
})
} catch (err) {
// error
console.log('e', err)
}
},