From 7b482b1ef080333728304f5ea740a2ddae5b7b7a Mon Sep 17 00:00:00 2001 From: dockermen Date: Wed, 9 Apr 2025 13:04:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96CNB?= =?UTF-8?q?=E7=BD=91=E5=9D=80=E7=9A=84=E5=B7=A5=E5=85=B7=E5=87=BD=E6=95=B0?= =?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E4=B8=BB=E7=A8=8B=E5=BA=8F=E4=BB=A5?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E8=BF=90=E8=A1=8C=E7=BD=91=E5=9D=80=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9Erequirements.txt=E6=96=87=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E5=92=8C=E6=A0=B7=E5=BC=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=8F=9C=E5=8D=95=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 +- requirements.txt | 14 +++++ templates/index.html | 123 +++++++++++++++++++++++++++++++++++++++---- utils/login.py | 30 ++++++----- utils/tools.py | 22 ++++++++ 5 files changed, 170 insertions(+), 23 deletions(-) create mode 100644 requirements.txt create mode 100644 utils/tools.py diff --git a/main.py b/main.py index 1546e3a..67b8cab 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,7 @@ import requests from flask import Flask, render_template, request, redirect, url_for, session,make_response,send_from_directory,jsonify from werkzeug.routing import BaseConverter from utils.login import login_quark - +from utils.tools import get_cnb_weburl app = Flask(__name__) #app = Flask(__name__,template_folder='templates') #修改模板目录 app.jinja_env.auto_reload = True @@ -62,6 +62,8 @@ def login(): return jsonify({"status": status}) if __name__ == "__main__": + weburl = get_cnb_weburl(5000) + print("Run_url:",weburl) app.config.from_pyfile("config.py") app.run(host="0.0.0.0") diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..bc863a1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,14 @@ +blinker==1.8.2 +certifi==2025.1.31 +charset-normalizer==3.4.1 +click==8.1.8 +Flask==3.0.3 +idna==3.10 +importlib_metadata==8.5.0 +itsdangerous==2.2.0 +Jinja2==3.1.6 +MarkupSafe==2.1.5 +requests==2.32.3 +urllib3==2.2.3 +Werkzeug==3.0.6 +zipp==3.20.2 diff --git a/templates/index.html b/templates/index.html index bb4e3e7..ba33b0e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,27 +6,115 @@ Vite + Vue - - - - + + + + -