fix: 公告按页、身份标签权限与菜单种子

This commit is contained in:
XingQue
2026-06-25 15:50:54 +08:00
parent 9575edcfc4
commit 59f5a695d8
4 changed files with 78 additions and 2 deletions

View File

@@ -63,7 +63,8 @@ def get_gonggao_content(request, notice_type=1, page_key=None):
club_id = _display_club_id(request)
pk = normalize_page_key(page_key, image_type=1) if page_key else LUNBO_PAGE_ORDER_POOL
obj = Gonggao.query.filter(club_id=club_id, page_key=pk).first()
if not obj and notice_type:
# 仅旧接口未传 page_key 时,才回退 NoticeType(兼容历史单条公告)
if not obj and notice_type and not page_key:
obj = Gonggao.query.filter(club_id=club_id, NoticeType=notice_type).first()
return obj.Content if obj and obj.Content else ''