From ac972f5f143a1d350dad6ccc623fbe66098923d3 Mon Sep 17 00:00:00 2001 From: ZaneYork Date: Wed, 11 Sep 2024 07:44:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dinner.py | 4 +--- templates/dinner.html | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dinner.py b/dinner.py index 23f547c..b568754 100644 --- a/dinner.py +++ b/dinner.py @@ -106,7 +106,7 @@ def dinner_update(): return make_response(json.dumps(dict(code=0, data="OK"))) for key in value: 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"))) @@ -145,8 +145,6 @@ def dinner(): summary = vote_reduce(fetch_user_menu_summary()) last_result = fetch_roll_result(-1) total_vote = sum(value for value in summary.values()) - if total_vote == 0: - total_vote = 1 result = fetch_roll_result() can_roll = (check_roll() == 1) all_choice = list(map(lambda x: {'name': x[0], 'label': x[1]}, fetch_all_menu())) diff --git a/templates/dinner.html b/templates/dinner.html index 096c19e..1bd9f26 100644 --- a/templates/dinner.html +++ b/templates/dinner.html @@ -46,7 +46,7 @@ {% endfor %} -
本项目抽签完全公开透明,源码开放欢迎随时审查