// 除了我想要保存的缓存之外其他的都清除
export function removeStorageInfo() {
wx.getStorageInfo({
success: function (res) {
const keys = res.keys;
console.log(keys, 'keys')
keys.forEach(function (key) {
if (key !== 'mylocalhost') {
wx.removeStorage({
key: key
});
}
});
}
});
}
02-09
2519
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-20
1270
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)