From d45be244a62b2d021dba29a928f061240046087c Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 10 Jun 2025 11:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E6=8E=A8=E9=80=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/dashboard/blueprints/auth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/dashboard/blueprints/auth.py b/admin/dashboard/blueprints/auth.py index e16157a..5a53722 100644 --- a/admin/dashboard/blueprints/auth.py +++ b/admin/dashboard/blueprints/auth.py @@ -29,6 +29,7 @@ def login(): if username == server.username and password == server.password: session['logged_in'] = True + session['username'] = username # 存储用户名到session return redirect(url_for('main.index')) else: error = '用户名或密码错误'