Fix:2581 【商城小程序】历史搜索--退出重新登录后,历史搜索被清空

This commit is contained in:
linxi
2024-11-20 15:50:04 +08:00
parent 5c92359a09
commit a14931a64e
+2 -2
View File
@@ -33,8 +33,8 @@ function clearAll() {
// uni.clearStorage() // uni.clearStorage()
const res = uni.getStorageInfoSync() const res = uni.getStorageInfoSync()
res.keys.map((item) => { res.keys.map((item) => {
// 不要清除spread和redirect、页面埋点数据 // 不要清除spread和redirect、页面埋点和历史搜索数据数据,
if ([pageViewDataCacheKey, 'redirect', 'spread'].includes(item)) { if ([pageViewDataCacheKey, 'redirect', 'spread', 'historyKey'].includes(item)) {
return return
} }
remove(item) remove(item)