41 lines
1.7 KiB
HTML
Executable File
41 lines
1.7 KiB
HTML
Executable File
{% extends "base.html" %}
|
|
{% block content %}
|
|
<div class="login_container">
|
|
<div class="login_box">
|
|
<h2 class="login_title">欢迎使用</h2>
|
|
<div class="login_subtitle">大化重点项目工单管理平台</div>
|
|
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
<div class="login_error">
|
|
{% for message in messages %}
|
|
{{ message }}
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<!-- Casdoor 登录跳转 -->
|
|
<div class="login_casdoor_section">
|
|
<a href="{{ url_for('casdoor_login') }}" class="login_button login_button_casdoor">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin-right: 8px;">
|
|
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="currentColor"/>
|
|
</svg>
|
|
使用 Casdoor 登录
|
|
</a>
|
|
<p style="margin-top: 12px; color: #666;">正在跳转至 Casdoor 登录页,如未跳转请点击按钮。</p>
|
|
</div>
|
|
<script>
|
|
// 有错误提示时停留在本页,方便用户查看信息
|
|
const hasError = {{ 'true' if get_flashed_messages() else 'false' }};
|
|
if (!hasError) {
|
|
// 自动跳转至 Casdoor 登录
|
|
window.onload = function() {
|
|
window.location.href = "{{ url_for('casdoor_login') }}";
|
|
};
|
|
}
|
|
</script>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|