feat(privacy): add markSkipped method and H5 skip logic for privacy popup
add markSkipped method to synchronously skip privacy popup, and call it in App.vue created hook for H5 environment when current URL matches skip condition
This commit is contained in:
@@ -164,6 +164,18 @@ const PrivacyManager = {
|
||||
return _needShow;
|
||||
},
|
||||
|
||||
/**
|
||||
* 同步标记本次跳过弹窗(不查 storage、不写 storage、不弹窗)
|
||||
* 必须在 page mounted 之前调用,避免 onLaunch await 让出事件循环后
|
||||
* privacy-popup.vue 的 consumePendingShow 走兜底分支把弹窗弹出来
|
||||
* 用于 H5 浏览器直访特定 URL(子串匹配)时不让隐私弹窗挡住
|
||||
*/
|
||||
markSkipped() {
|
||||
_needShow = false;
|
||||
_hasChecked = true;
|
||||
_pendingShow = false;
|
||||
},
|
||||
|
||||
/**
|
||||
* 触发弹窗(如果需要)
|
||||
* 由 App.vue onLaunch 在 boot 完成后调用
|
||||
|
||||
Reference in New Issue
Block a user