From 2ee703d2ebb48556b9fcdcfd7bb1c4bc95fcd6cf Mon Sep 17 00:00:00 2001 From: wojiaoyishang Date: Fri, 24 Jan 2025 19:13:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=BF=9B=E8=A1=8C=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/view/system/passport.py | 2 +- static/system/admin/css/other/error.css | 76 +++++++++++++++++++++++++ templates/errors/403.html | 4 +- templates/errors/404.html | 4 +- templates/errors/500.html | 6 +- 5 files changed, 84 insertions(+), 8 deletions(-) create mode 100644 static/system/admin/css/other/error.css diff --git a/applications/view/system/passport.py b/applications/view/system/passport.py index 503cc47..acb21bd 100644 --- a/applications/view/system/passport.py +++ b/applications/view/system/passport.py @@ -21,7 +21,7 @@ def get_captcha(): @bp.get('/login') def login(): if current_user.is_authenticated: - return redirect(url_for('system.index')) + return redirect(url_for('index.index')) return render_template('system/login.html') diff --git a/static/system/admin/css/other/error.css b/static/system/admin/css/other/error.css new file mode 100644 index 0000000..37d4c0e --- /dev/null +++ b/static/system/admin/css/other/error.css @@ -0,0 +1,76 @@ +* { + padding: 0; + margin: 0; + font-size: 0.38rem; +} + +ul { + list-style: none; +} + +a { + text-decoration: none; + -webkit-tap-highlight-color: transparent +} + +.clearfix:after { + content: ''; + width: 0; + height: 0; + display: block; + clear: both; +} + +html { + height: 100%; + width: 100%; +} + +body { + font-size: 0.28rem; + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + position: relative; + background-color: white !important; +} + +.content { + position: absolute; + top: 50%; + transform: translateY(-50%); + width: 100%; + text-align: center; +} + +.content>img { + height: 300px; + max-width: 370px; + margin-right: 180px; +} + +.content>* { + display: inline-block; +} + +.content-r { + vertical-align: top; +} + +.content-r>h1 { + font-size: 72px; + color: #434e59; + margin-bottom: 24px; + font-weight: 600; +} + +.content-r>p { + font-size: 20px; + color: rgba(0, 0, 0, .45); + margin-bottom: 16px; +} + +button { + margin-top: 20px; +} diff --git a/templates/errors/403.html b/templates/errors/403.html index d3124d0..65eb941 100644 --- a/templates/errors/403.html +++ b/templates/errors/403.html @@ -3,7 +3,7 @@ - + {% include 'system/common/header.html' %} @@ -12,7 +12,7 @@

403

抱歉,你无权访问该页面

- +
diff --git a/templates/errors/404.html b/templates/errors/404.html index 10ebcdd..4200625 100644 --- a/templates/errors/404.html +++ b/templates/errors/404.html @@ -3,7 +3,7 @@ - + {% include 'system/common/header.html' %} @@ -12,7 +12,7 @@

404

抱歉,你访问的页面不存在或仍在开发中

- +
diff --git a/templates/errors/500.html b/templates/errors/500.html index e5b4130..45b5f85 100644 --- a/templates/errors/500.html +++ b/templates/errors/500.html @@ -2,8 +2,8 @@ - - + 500 + {% include 'system/common/header.html' %} admin/ @@ -12,7 +12,7 @@

500

抱歉,服务器出错了

- +