feat: add profile and defalt hospital

This commit is contained in:
2026-06-18 15:21:09 +08:00
parent d92efed6ae
commit e1a5ca2afa
5 changed files with 28 additions and 11 deletions
+3
View File
@@ -282,9 +282,12 @@ def hospital_overview(request):
profile = {
'institution_id': inst_id,
'code': inst.code if inst else '',
'name': inst.name if inst else '',
'logo': _build_banner_url(request, inst.banner_url) if inst else '', # 完整 URL(含 STATIC_PUBLIC_PREFIX
'level': inst.level if inst else '',
'province': inst.province if inst else '',
'city': inst.city if inst else '',
'cooperation_days': (now - inst.created_at).days if inst and inst.created_at else None,
}