Feat(页面):未登录时页面埋点数据写入缓存以便下次登录时获取上报
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user