258 lines
8.0 KiB
HTML
258 lines
8.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>登录 - OA系统</title>
|
|
<!-- Element UI CSS -->
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
<!-- 美化样式 -->
|
|
<link rel="stylesheet" href="enhanced-styles.css">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.login-container {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(20px);
|
|
border-radius: 20px;
|
|
padding: 48px;
|
|
width: 100%;
|
|
max-width: 420px;
|
|
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
.logo {
|
|
text-align: center;
|
|
margin-bottom: 32px;
|
|
}
|
|
.logo-icon {
|
|
width: 90px;
|
|
height: 90px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
border-radius: 50%;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 44px;
|
|
color: white;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
|
|
transition: all 0.3s;
|
|
}
|
|
.logo-icon:hover {
|
|
transform: scale(1.1) rotate(5deg);
|
|
box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
|
|
}
|
|
.logo-title {
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
.logo-subtitle {
|
|
font-size: 14px;
|
|
color: #999;
|
|
margin-top: 8px;
|
|
}
|
|
.form-item {
|
|
margin-bottom: 24px;
|
|
}
|
|
.form-label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
color: #333;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
.form-input {
|
|
width: 100%;
|
|
padding: 14px 18px;
|
|
border: 2px solid #e4e7ed;
|
|
border-radius: 12px;
|
|
font-size: 15px;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
background: #fafbfc;
|
|
}
|
|
.form-input:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
background: #ffffff;
|
|
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
|
|
transform: translateY(-1px);
|
|
}
|
|
.password-wrapper {
|
|
position: relative;
|
|
}
|
|
.password-toggle {
|
|
position: absolute;
|
|
right: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: none;
|
|
border: none;
|
|
color: #999;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
}
|
|
.remember-forgot {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
.remember {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
.remember input {
|
|
margin-right: 8px;
|
|
}
|
|
.forgot-link {
|
|
color: #409EFF;
|
|
font-size: 14px;
|
|
text-decoration: none;
|
|
}
|
|
.forgot-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.btn-login {
|
|
width: 100%;
|
|
padding: 16px;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 12px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
.btn-login::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 0;
|
|
height: 0;
|
|
border-radius: 50%;
|
|
background: rgba(255, 255, 255, 0.3);
|
|
transform: translate(-50%, -50%);
|
|
transition: width 0.6s, height 0.6s;
|
|
}
|
|
.btn-login:hover {
|
|
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
|
|
transform: translateY(-2px);
|
|
}
|
|
.btn-login:active {
|
|
transform: translateY(0);
|
|
}
|
|
.btn-login:active::before {
|
|
width: 300px;
|
|
height: 300px;
|
|
}
|
|
.btn-login:active {
|
|
background: #3a8ee6;
|
|
}
|
|
</style>
|
|
<!-- Vue.js -->
|
|
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
|
|
<!-- Element UI JS -->
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<div class="logo">
|
|
<div class="logo-icon">OA</div>
|
|
<div class="logo-title">OA系统</div>
|
|
<div class="logo-subtitle">企业办公管理平台</div>
|
|
</div>
|
|
|
|
<form id="loginForm">
|
|
<div class="form-item">
|
|
<label class="form-label">用户名</label>
|
|
<input type="text" class="form-input" placeholder="请输入用户名" required>
|
|
</div>
|
|
|
|
<div class="form-item">
|
|
<label class="form-label">密码</label>
|
|
<div class="password-wrapper">
|
|
<input type="password" class="form-input" placeholder="请输入密码" id="passwordInput" required>
|
|
<button type="button" class="password-toggle" onclick="togglePassword()">👁️</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="remember-forgot">
|
|
<label class="remember">
|
|
<input type="checkbox">
|
|
<span>记住密码</span>
|
|
</label>
|
|
<a href="forgot-password.html" class="forgot-link">忘记密码?</a>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-login">登录</button>
|
|
</form>
|
|
</div>
|
|
|
|
<script>
|
|
function togglePassword() {
|
|
const input = document.getElementById('passwordInput');
|
|
const toggle = event.target;
|
|
if (input.type === 'password') {
|
|
input.type = 'text';
|
|
toggle.textContent = '🙈';
|
|
} else {
|
|
input.type = 'password';
|
|
toggle.textContent = '👁️';
|
|
}
|
|
}
|
|
|
|
document.getElementById('loginForm').addEventListener('submit', function(e) {
|
|
e.preventDefault();
|
|
const username = this.querySelector('input[type="text"]').value;
|
|
const password = this.querySelector('input[type="password"]').value;
|
|
|
|
if (!username || !password) {
|
|
CommonUtils.showMessage('请输入用户名和密码', 'error');
|
|
return;
|
|
}
|
|
|
|
const btn = this.querySelector('.btn-login');
|
|
btn.textContent = '登录中...';
|
|
btn.disabled = true;
|
|
|
|
setTimeout(() => {
|
|
window.location.href = 'project-initiation.html';
|
|
}, 800);
|
|
});
|
|
</script>
|
|
<script src="common.js"></script>
|
|
</body>
|
|
</html>
|
|
|