👀v0.2.2,票种按天分组

This commit is contained in:
Asankilp 2024-08-24 23:00:06 +08:00
parent a427dadae9
commit ffc28c98f5
3 changed files with 21 additions and 8 deletions

View File

@ -101,7 +101,8 @@ def process_show_details_data_to_template(show_details_data: dict):
"price": ticket.get("price", 0),
"sale_start": convert_timestamp(ticket.get("saleStart", 0)),
"sale_end": convert_timestamp(ticket.get("saleEnd", 0)),
"status": ticket.get("sale_flag", {}).get("display_name", "")
"status": ticket.get("sale_flag", {}).get("display_name", ""),
"screen_name": ticket.get("screen_name")
})
guests_list = data["guests"]
if guests_list != None:

View File

@ -26,10 +26,13 @@
<div class="detail_content">
<div class="details">
<div class="title">{{ show.name }}</div>
<div class="venue_name">地点:{{ show.venue_name }} {{show.venue_detail}}</div>
<div class="venue_name">地点:{{ show.venue_name }} {{ show.venue_detail }}</div>
<div class="start-time">开始时间:{{ show.start_time }}</div>
<div class="end-time">结束时间:{{ show.end_time }}</div>
<div class="organizer">主办方:{{ show.organizer }}</div>
{% if show.guests %}
<div class="guests">嘉宾:{{ show.guests }}</div>
{% endif %}
<div class="status">
{% macro icon(name) %}
<img src="./svg/{{ name }}.svg" class="vector_icon" width="8px" height="8px">
@ -40,18 +43,27 @@
{% if show.id_bind == 1 %}
{{ icon('yes') }} 实名制
{% endif %}
{% if show.has_eticket == True %}
{% if show.has_eticket %}
{{ icon('yes') }} 电子票/兑换票
{% endif %}
</div>
<div class="placeholder"></div>
</div>
</div>
<div class="details">
{% for ticket in show.ticket_info %}
<div class="ticket_box">{{ ticket.description }} {{ ticket.sale_start }} -- {{ ticket.sale_end }} ¥{{ ticket.price / 100 }} ({{ ticket.status }})</div>
{% endfor %}
<!-- 按 screen_name 分组的票务信息 -->
{% for screen_name, tickets in show.ticket_info | groupby('screen_name') %}
<div class="screen_name_group">
<h3>{{ screen_name }}</h3>
<div class="details">
{% for ticket in tickets %}
<div class="ticket_box">
{{ ticket.description }} {{ ticket.sale_start }} -- {{ ticket.sale_end }} ¥{{ ticket.price / 100 }} ({{ ticket.status }})
</div>
{% endfor %}
</div>
</div>
{% endfor %}
<!-- 页脚 -->
<div class="footer">

View File

@ -1,6 +1,6 @@
[project]
name = "nonebot-plugin-acgnshow"
version = "0.2.1"
version = "0.2.2"
description = "Nonebot2插件从哔哩哔哩会员购获取简易展览数据"
readme = "README.md"
requires-python = "<4.0,>=3.9"