修复公共电子屏路由错误的bug

This commit is contained in:
2025-11-11 16:27:28 +08:00
parent 391f110ec5
commit 9c190bd413

View File

@@ -40,7 +40,13 @@
{% for screen in public_screens %} {% for screen in public_screens %}
<div class="border rounded-lg overflow-hidden shadow-md hover:shadow-lg transition-shadow"> <div class="border rounded-lg overflow-hidden shadow-md hover:shadow-lg transition-shadow">
<div class="relative"> <div class="relative">
{% if screen.image %}
<img src="{{ screen.image.url }}" alt="{{ screen.get_screen_type_display }}" class="w-full h-[150px] object-cover cursor-pointer" onclick="openModal('{{ screen.image.url }}')"> <img src="{{ screen.image.url }}" alt="{{ screen.get_screen_type_display }}" class="w-full h-[150px] object-cover cursor-pointer" onclick="openModal('{{ screen.image.url }}')">
{% else %}
<div class="w-full h-[150px] bg-gray-200 flex items-center justify-center">
<span class="text-gray-500">暂无图片</span>
</div>
{% endif %}
<div class="absolute top-2 right-2 bg-black bg-opacity-50 text-white px-2 py-1 rounded text-sm"> <div class="absolute top-2 right-2 bg-black bg-opacity-50 text-white px-2 py-1 rounded text-sm">
{{ screen.get_screen_type_display }} {{ screen.get_screen_type_display }}
</div> </div>