Feat(页面):未登录时页面埋点数据写入缓存以便下次登录时获取上报

This commit is contained in:
lifizer
2024-06-16 16:33:41 +08:00
parent 4e6d5598b7
commit 19914b5b0d
4 changed files with 44 additions and 7 deletions
+4 -4
View File
@@ -1,4 +1,5 @@
import { trim, isType } from "@/utils";
import { pageViewDataCacheKey } from '@/config/index'
const doc = null;
// const doc = window.document;
@@ -30,15 +31,14 @@ function remove(key) {
function clearAll() {
// uni.clearStorage()
const res = uni.getStorageInfoSync();
const res = uni.getStorageInfoSync()
res.keys.map((item) => {
//不要清除spread和redirect
if (item == 'redirect' || item == 'spread') {
// 不要清除spread和redirect、页面埋点数据
if ([pageViewDataCacheKey, 'redirect', 'spread'].includes(item)) {
return
}
remove(item)
})
console.log(res)
}
function _has(key) {