Update 2026-06-10 11:45:26
This commit is contained in:
+65
-130
@@ -1,140 +1,75 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% extends "admin/login_base.html" %}
|
||||
{% load i18n admin_static %}
|
||||
|
||||
{% block extrastyle %}{{ block.super }}
|
||||
<style>
|
||||
body {
|
||||
background: url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
#container {
|
||||
background: transparent;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
#content {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 20px 40px rgba(0,0,0,0.3);
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: 40px;
|
||||
backdrop-filter: blur(8px);
|
||||
margin: 0;
|
||||
}
|
||||
.login #header, .login .breadcrumbs, .login #footer { display: none; }
|
||||
#content-title { display: none; }
|
||||
.login .form-row { border: none; padding: 12px 0; }
|
||||
.login label { display: block; margin-bottom: 8px; color: #444; font-weight: 600; font-size: 14px; }
|
||||
.login input[type=text], .login input[type=password] {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
transition: border-color 0.3s;
|
||||
}
|
||||
.login input[type=text]:focus, .login input[type=password]:focus {
|
||||
border-color: #007bff;
|
||||
outline: none;
|
||||
}
|
||||
.submit-row { margin-top: 24px; text-align: center; }
|
||||
.submit-row input {
|
||||
background: #007bff;
|
||||
color: white;
|
||||
padding: 12px 0;
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
transition: background 0.3s, transform 0.2s;
|
||||
}
|
||||
.submit-row input:hover {
|
||||
background: #0056b3;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.submit-row input:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.default-account {
|
||||
margin-top: 30px;
|
||||
padding: 15px;
|
||||
background: #f0f7ff;
|
||||
border-left: 4px solid #007bff;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
color: #555;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.brand-logo {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.brand-logo h1 {
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.errornote {
|
||||
background: #fff5f5;
|
||||
color: #e53e3e;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #feb2b2;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
<div class="brand-logo">
|
||||
<h1>智捷ERP</h1>
|
||||
<p style="color: #666; margin-top: 5px;">高效管理 · 企业互联</p>
|
||||
<div class="login-shell">
|
||||
<div class="login-brand">
|
||||
<div class="login-brand-inner">
|
||||
<div class="login-brand-logo">⚡</div>
|
||||
<h1>智捷ERP</h1>
|
||||
<p class="login-brand-tagline">SmartJet ERP</p>
|
||||
<p class="login-brand-desc">高效管理 · 智能协同 · 企业互联</p>
|
||||
<ul class="login-brand-features">
|
||||
<li>销售 / 采购 / 库存一体化</li>
|
||||
<li>组织架构与审批流程</li>
|
||||
<li>数据驱动经营决策</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if form.errors and not form.non_field_errors %}
|
||||
<p class="errornote">
|
||||
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<p class="errornote">
|
||||
{{ error }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="login-panel">
|
||||
<div class="login-card">
|
||||
<div class="login-card-header">
|
||||
<h2>欢迎登录</h2>
|
||||
<p>请输入您的账号和密码</p>
|
||||
</div>
|
||||
|
||||
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
|
||||
<div class="form-row">
|
||||
{{ form.username.label_tag }} {{ form.username }}
|
||||
</div>
|
||||
<div class="form-row">
|
||||
{{ form.password.label_tag }} {{ form.password }}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</div>
|
||||
<div class="submit-row">
|
||||
<input type="submit" value="{% trans 'Log in' %}" />
|
||||
</div>
|
||||
</form>
|
||||
{% if form.errors and not form.non_field_errors %}
|
||||
<div class="login-error">
|
||||
{% if form.errors.items|length == 1 %}请修正以下错误。{% else %}请修正以下错误。{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="default-account">
|
||||
<strong style="color: #007bff;">演示账号</strong><br>
|
||||
用户名:admin<br>
|
||||
密 码:admin
|
||||
{% if form.non_field_errors %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<div class="login-error">{{ error }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<div class="login-error">
|
||||
您已以 {{ user.get_username }} 登录,但无权访问此页面。请使用其他账号登录。
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ app_path }}" method="post" id="login-form" class="login-form">
|
||||
{% csrf_token %}
|
||||
<div class="login-field">
|
||||
<label for="id_username">用户名</label>
|
||||
{{ form.username }}
|
||||
</div>
|
||||
<div class="login-field">
|
||||
<label for="id_password">密码</label>
|
||||
{{ form.password }}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</div>
|
||||
<button type="submit" class="login-submit">登 录</button>
|
||||
</form>
|
||||
|
||||
<div class="login-demo">
|
||||
<div class="login-demo-title">演示账号</div>
|
||||
<div class="login-demo-row">
|
||||
<span>用户名</span><code>xinmi_admin</code>
|
||||
</div>
|
||||
<div class="login-demo-row">
|
||||
<span>密 码</span><code>admin123456</code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-footer-link">
|
||||
<a href="http://code.xinmi.cloud/" target="_blank" rel="noopener">智捷ERP · 新觅源码库</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user