feat(admin): 绑定订阅后回跳提示增强(attached_subscription + 滚动)

This commit is contained in:
萝卜
2026-03-15 17:23:58 +08:00
parent 77fd8af295
commit 7dd508e84d
3 changed files with 108 additions and 1 deletions

View File

@@ -12,6 +12,16 @@
return (root || document).querySelector(sel);
}
// 续费缺订阅治理:绑定成功后自动滚动到顶部提示区(让运营立刻看到 success/warning/error
// 说明:由后端 redirect url 追加 attached_subscription=1 触发。
if (window.location && window.location.search && window.location.search.indexOf('attached_subscription=1') >= 0) {
try {
window.scrollTo({ top: 0, behavior: 'smooth' });
} catch (e) {
window.scrollTo(0, 0);
}
}
// 续费缺订阅治理订单详情页“绑定订阅ID”输入框小交互增强
// - 输入后按 Enter 直接提交
// - 自动聚焦,减少点击