孕期首页过渡:过预产期询问避让首页引导、弹窗、底部弹层
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -214,8 +214,14 @@
|
||||
if (over < 1) return;
|
||||
var today = iso(new Date());
|
||||
try { if (!DEMO && localStorage.getItem(ASK_KEY) === today) return; localStorage.setItem(ASK_KEY, today); } catch (e) {}
|
||||
/* 等首页先渲染、开屏引导之类的弹层先走,再问 */
|
||||
setTimeout(function () { if (!ov.classList.contains('on')) askSheet(over); }, 2500);
|
||||
/* 等首页先渲染;首页使用引导、弹窗、底部弹层开着就再等等,别叠在一起 */
|
||||
var tries = 0;
|
||||
function wait() {
|
||||
var busy = $('.mb-coach.show') || $('.modal.show') || $('#sheet.show') || document.hidden;
|
||||
if (busy && ++tries < 90) return setTimeout(wait, 2000);
|
||||
if (!ov.classList.contains('on')) askSheet(over);
|
||||
}
|
||||
setTimeout(wait, 2500);
|
||||
}
|
||||
|
||||
function apply(pg, pf) {
|
||||
|
||||
Reference in New Issue
Block a user