From 66b5d0d287a3f433c408be9b2a30d327f7c1ff52 Mon Sep 17 00:00:00 2001 From: Gzs2406 <2069733833@qq.com> Date: Fri, 3 Jan 2025 15:32:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AE=8C=E5=96=84=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=83=AD=E5=BF=97=E8=83=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router/api.py | 3 +- router/page.py | 16 +++++ templates/index.html | 67 +++++++++++++++++-- templates/ordercount.html | 89 +++++++++++++++++++++++++ templates/streamordernamecount.html | 91 +++++++++++++++++++++++++ templates/streamordersummary.html | 91 +++++++++++++++++++++++++ templates/streamsummary.html | 100 ++++++++++++++++++++++++++++ 7 files changed, 452 insertions(+), 5 deletions(-) create mode 100644 templates/ordercount.html create mode 100644 templates/streamordernamecount.html create mode 100644 templates/streamordersummary.html create mode 100644 templates/streamsummary.html diff --git a/router/api.py b/router/api.py index 8b849a3..5478412 100644 --- a/router/api.py +++ b/router/api.py @@ -54,8 +54,9 @@ def orders_count_by_name(): finally: # 取消订阅并关闭消费者 consumer.close() - + print(messages) return jsonify(messages) + @api_bp.route('/stream/ordernamecount') diff --git a/router/page.py b/router/page.py index 91ea9b5..8b9a7a5 100644 --- a/router/page.py +++ b/router/page.py @@ -10,3 +10,19 @@ def index(): @page_bp.route('/show') def test(): return render_template('show.html') + +@page_bp.route('/ordercount') +def ordercount(): + return render_template('ordercount.html') + +@page_bp.route('/streamordersummary') +def streamodersummary(): + return render_template('streamordersummary.html') + +@page_bp.route('/streamordernamecount') +def streamodernamecount(): + return render_template('streamordernamecount.html') + +@page_bp.route('/streamsummary') +def streamsummary(): + return render_template('streamsummary.html') diff --git a/templates/index.html b/templates/index.html index 77ecd81..7ec971d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,12 +4,71 @@