front/src/utils/h5FollowPrompt.ts
zzh f1d219ae48 feat: ship billing UI for additional services, conditions, and fee insights
Add product/channel billing condition editors, place-order additional services, billing simulator, forecast-to-inbound fee delta and margin warnings, insurance-aware claim tips, OMS preset dict seeds, and related AI skills/system pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 18:09:22 +08:00

31 lines
724 B
TypeScript

/** 注册/绑定成功后进入 H5 弹出一次「关注公众号」引导 */
const FOLLOW_PROMPT_KEY = 'oms.h5.followPrompt';
export function markH5FollowPromptPending(): void {
try {
sessionStorage.setItem(FOLLOW_PROMPT_KEY, '1');
} catch {
/* ignore */
}
}
export function peekH5FollowPromptPending(): boolean {
try {
return sessionStorage.getItem(FOLLOW_PROMPT_KEY) === '1';
} catch {
return false;
}
}
/** 取出并清除标记;仅在确定要展示弹窗时调用 */
export function consumeH5FollowPromptPending(): boolean {
if (!peekH5FollowPromptPending()) return false;
try {
sessionStorage.removeItem(FOLLOW_PROMPT_KEY);
} catch {
/* ignore */
}
return true;
}