From e7aed0ecef1cafdd5e7b4ebaa0bb2ace8722b399 Mon Sep 17 00:00:00 2001 From: HuangHai <10402852@qq.com> Date: Fri, 5 Sep 2025 16:05:03 +0800 Subject: [PATCH] 'commit' --- dsLightRag/path/to/target.html | 0 dsLightRag/static/vue/login.css | 135 +++++++++++++++++++++++++++++++ dsLightRag/static/vue/login.html | 94 +++++++++++++++++++++ dsLightRag/static/vue/login.js | 43 ++++++++++ 4 files changed, 272 insertions(+) delete mode 100644 dsLightRag/path/to/target.html create mode 100644 dsLightRag/static/vue/login.css create mode 100644 dsLightRag/static/vue/login.html create mode 100644 dsLightRag/static/vue/login.js diff --git a/dsLightRag/path/to/target.html b/dsLightRag/path/to/target.html deleted file mode 100644 index e69de29b..00000000 diff --git a/dsLightRag/static/vue/login.css b/dsLightRag/static/vue/login.css new file mode 100644 index 00000000..52633ed0 --- /dev/null +++ b/dsLightRag/static/vue/login.css @@ -0,0 +1,135 @@ +:root { + --primary-color: #4361ee; + --secondary-color: #3a0ca3; + --accent-color: #7209b7; + --light-bg: #f8f9fa; + --card-shadow: 0 20px 40px rgba(0,0,0,0.1); +} + +body { + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +} + +.login-container { + width: 100%; + max-width: 400px; + padding: 20px; +} + +.login-card { + background: white; + border-radius: 20px; + padding: 40px 30px; + box-shadow: var(--card-shadow); + border: none; +} + +.login-header { + text-align: center; + margin-bottom: 30px; +} + +.login-logo { + width: 80px; + height: 80px; + background: var(--primary-color); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + margin: 0 auto 20px; + color: white; + font-size: 32px; +} + +.login-title { + color: #2c3e50; + font-weight: 700; + font-size: 28px; + margin-bottom: 5px; +} + +.login-subtitle { + color: #7f8c8d; + font-size: 14px; +} + +.form-group { + margin-bottom: 20px; +} + +.form-control { + border: 2px solid #e9ecef; + border-radius: 12px; + padding: 15px 20px; + font-size: 16px; + transition: all 0.3s ease; +} + +.form-control:focus { + border-color: var(--primary-color); + box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25); +} + +.form-label { + font-weight: 600; + color: #2c3e50; + margin-bottom: 8px; +} + +.btn-login { + background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); + border: none; + border-radius: 12px; + padding: 15px; + font-size: 16px; + font-weight: 600; + transition: all 0.3s ease; + width: 100%; +} + +.btn-login:hover { + transform: translateY(-2px); + box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3); +} + +.login-footer { + text-align: center; + margin-top: 20px; +} + +.forgot-password { + color: var(--primary-color); + text-decoration: none; + font-size: 14px; +} + +.forgot-password:hover { + text-decoration: underline; +} + +.alert { + border-radius: 12px; + border: none; + padding: 15px; + margin-bottom: 20px; +} + +@media (max-width: 576px) { + .login-container { + padding: 15px; + } + + .login-card { + padding: 30px 20px; + } + + .login-title { + font-size: 24px; + } +} \ No newline at end of file diff --git a/dsLightRag/static/vue/login.html b/dsLightRag/static/vue/login.html new file mode 100644 index 00000000..6631572f --- /dev/null +++ b/dsLightRag/static/vue/login.html @@ -0,0 +1,94 @@ + + + + + + 系统登录 + + + + + + + + + + +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/dsLightRag/static/vue/login.js b/dsLightRag/static/vue/login.js new file mode 100644 index 00000000..f37cb294 --- /dev/null +++ b/dsLightRag/static/vue/login.js @@ -0,0 +1,43 @@ +const { createApp, ref, reactive } = Vue; + +createApp({ + setup() { + const form = reactive({ + username: '', + password: '', + rememberMe: false + }); + + const loading = ref(false); + const errorMessage = ref(''); + + const handleLogin = async () => { + loading.value = true; + errorMessage.value = ''; + + try { + // 模拟登录请求 + await new Promise(resolve => setTimeout(resolve, 1500)); + + if (form.username === 'admin' && form.password === '123456') { + alert('登录成功!'); + // 这里可以跳转到首页 + console.log('登录成功', form); + } else { + errorMessage.value = '用户名或密码错误'; + } + } catch (error) { + errorMessage.value = '登录失败,请稍后重试'; + } finally { + loading.value = false; + } + }; + + return { + form, + loading, + errorMessage, + handleLogin + }; + } +}).mount('#app'); \ No newline at end of file