This commit is contained in:
ZaneYork 2024-09-11 07:44:31 +08:00
parent 169873d46d
commit ac972f5f14
2 changed files with 2 additions and 4 deletions

View File

@ -106,7 +106,7 @@ def dinner_update():
return make_response(json.dumps(dict(code=0, data="OK"))) return make_response(json.dumps(dict(code=0, data="OK")))
for key in value: for key in value:
value[key] = int(value[key]) / summary value[key] = int(value[key]) / summary
set_user_menu(json.dumps(value)) set_user_menu(json.dumps(value, ensure_ascii=False))
return make_response(json.dumps(dict(code=0, data="OK"))) return make_response(json.dumps(dict(code=0, data="OK")))
@ -145,8 +145,6 @@ def dinner():
summary = vote_reduce(fetch_user_menu_summary()) summary = vote_reduce(fetch_user_menu_summary())
last_result = fetch_roll_result(-1) last_result = fetch_roll_result(-1)
total_vote = sum(value for value in summary.values()) total_vote = sum(value for value in summary.values())
if total_vote == 0:
total_vote = 1
result = fetch_roll_result() result = fetch_roll_result()
can_roll = (check_roll() == 1) can_roll = (check_roll() == 1)
all_choice = list(map(lambda x: {'name': x[0], 'label': x[1]}, fetch_all_menu())) all_choice = list(map(lambda x: {'name': x[0], 'label': x[1]}, fetch_all_menu()))

View File

@ -46,7 +46,7 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
<div class="fixed-bottom"><a class="link-secondary" style="text-decoration: none; font-size: 0.8rem" <div class="fixed-bottom" style="padding-bottom: 20px"><a class="link-secondary" style="text-decoration: none; font-size: 0.8rem"
href="https://git.zaneyork.cn:8443/ZaneYork/dinner_vote">本项目抽签完全公开透明,源码开放欢迎随时审查</a> href="https://git.zaneyork.cn:8443/ZaneYork/dinner_vote">本项目抽签完全公开透明,源码开放欢迎随时审查</a>
</div> </div>
</div> </div>