From 589a653a9425c3dba6ff4f9623c0a81d4def8811 Mon Sep 17 00:00:00 2001 From: XingQue Date: Wed, 29 Jul 2026 04:51:28 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=98=8E=E7=A1=AE=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=85=A5=E5=8F=A3=E4=BB=85=E9=9A=8F=E8=AE=A1=E5=88=92=E5=90=AF?= =?UTF-8?q?=E7=94=A8=EF=BC=8C=E4=B8=8E=E5=BC=BA=E5=88=B6=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E8=A7=A3=E8=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EOF Co-authored-by: Cursor --- jituan/services/club_migrate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jituan/services/club_migrate.py b/jituan/services/club_migrate.py index 15963b8..4ef857e 100644 --- a/jituan/services/club_migrate.py +++ b/jituan/services/club_migrate.py @@ -925,8 +925,8 @@ def gate_for_user(*, club_id: str, user_uid: str, roles: Optional[List[str]] = N if roles: role_hit = any(r in force_roles for r in roles) has_assets = user_has_migratable_assets(plan, user_uid) - # 强制:仍要有可迁资产(空资产别拦死首页) - # 入口:只要还有剩余次数就展示(含二次名额),不必依赖第一次强制拦截 + # 关后台「启用」→ find_active 找不到计划 → 上面已全 false,前端零感知 + # 开「启用」:源店可展示入口;「强制拦截」只控制是否自动跳,两者独立 force = bool(plan.force_intercept and role_hit and not done and has_assets) show_entry = bool(not done) return { @@ -940,6 +940,7 @@ def gate_for_user(*, club_id: str, user_uid: str, roles: Optional[List[str]] = N 'from_club_id': plan.from_club_id, 'to_club_id': plan.to_club_id, 'force_roles': force_roles, + 'force_intercept': bool(plan.force_intercept), 'success_count': success_count(plan.plan_id, user_uid), 'max_allowed': max_allowed_success(plan, user_uid), 'is_target': False,