+

@@ -22,7 +22,7 @@
name="username"
:rules="[{ required: true, message: '请输入用户名' }]"
>
-
+
-
+
-
+
@@ -64,7 +64,11 @@
name="username"
:rules="[{ required: true, message: '请输入用户名' }]"
>
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
登录
+
+
+
+
+ 其他登录方式
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -85,6 +124,13 @@
{{ errorMessage }}
+
+
+
@@ -96,6 +142,8 @@ import { useUserStore } from '@/stores/user';
import { message } from 'ant-design-vue';
import { chatApi } from '@/apis/auth_api';
import { authApi } from '@/apis/public_api';
+import { UserOutlined, LockOutlined, WechatOutlined, QrcodeOutlined, ThunderboltOutlined } from '@ant-design/icons-vue';
+import loginBg from '@/assets/pics/login_bg.jpg';
const router = useRouter();
const userStore = useUserStore();
@@ -104,6 +152,7 @@ const userStore = useUserStore();
const isFirstRun = ref(false);
const loading = ref(false);
const errorMessage = ref('');
+const rememberMe = ref(false);
// 登录表单
const loginForm = reactive({
@@ -118,6 +167,11 @@ const adminForm = reactive({
confirmPassword: ''
});
+// 开发中功能提示
+const showDevMessage = () => {
+ message.info('该功能正在开发中,敬请期待!');
+};
+
// 密码确认验证
const validateConfirmPassword = (rule, value) => {
if (value === '') {
@@ -249,15 +303,32 @@ onMounted(async () => {
display: flex;
justify-content: center;
align-items: center;
- background-color: #f5f5f5;
+ background-size: cover;
+ background-position: center;
+ position: relative;
+
+ &::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.1);
+ z-index: 0;
+ }
}
.login-container {
- width: 400px;
+ width: 420px;
padding: 40px;
- background-color: white;
- border-radius: 8px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
+ background-color: rgba(255, 255, 255, 0.9);
+ border-radius: 12px;
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
+ position: relative;
+ z-index: 1;
+ backdrop-filter: blur(8px);
+ border: 2px solid white;
}
.login-logo {
@@ -265,24 +336,55 @@ onMounted(async () => {
margin-bottom: 30px;
img {
- height: 60px;
+ height: 70px;
margin-bottom: 16px;
}
h1 {
- font-size: 24px;
+ font-size: 28px;
font-weight: 600;
- color: #333;
+ color: var(--main-color);
margin: 0;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
}
.login-form {
h2 {
text-align: center;
- margin-bottom: 24px;
- font-size: 20px;
+ margin-bottom: 30px;
+ font-size: 22px;
font-weight: 500;
+ color: #333;
+ }
+
+ :deep(.ant-form-item) {
+ margin-bottom: 20px;
+ }
+
+ :deep(.ant-input-affix-wrapper) {
+ padding: 10px 11px;
+ height: auto;
+ }
+
+ :deep(.ant-btn) {
+ font-size: 16px;
+ }
+}
+
+.login-options {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ margin-bottom: 8px;
+
+ .forgot-password {
+ color: #1890ff;
+ font-size: 14px;
+
+ &:hover {
+ color: #40a9ff;
+ }
}
}
@@ -294,11 +396,83 @@ onMounted(async () => {
.error-message {
margin-top: 16px;
- padding: 8px 12px;
+ padding: 10px 12px;
background-color: #fff2f0;
border: 1px solid #ffccc7;
border-radius: 4px;
color: #ff4d4f;
font-size: 14px;
}
+
+.third-party-login {
+ margin-top: 20px;
+
+ .divider {
+ position: relative;
+ text-align: center;
+ margin: 16px 0;
+
+ &::before, &::after {
+ content: '';
+ position: absolute;
+ top: 50%;
+ width: calc(50% - 60px);
+ height: 1px;
+ background-color: #e8e8e8;
+ }
+
+ &::before {
+ left: 0;
+ }
+
+ &::after {
+ right: 0;
+ }
+
+ span {
+ display: inline-block;
+ padding: 0 12px;
+ background-color: #fff;
+ position: relative;
+ color: #999;
+ font-size: 14px;
+ }
+ }
+
+ .login-icons {
+ display: flex;
+ justify-content: center;
+ margin-top: 16px;
+
+ .login-icon {
+ margin: 0 12px;
+ width: 42px;
+ height: 42px;
+ color: #666;
+ border: 1px solid var(--gray-300);
+ transition: all 0.3s;
+
+ &:hover {
+ color: var(--main-color);
+ border-color: var(--main-color);
+ }
+ }
+ }
+}
+
+.login-footer {
+ margin-top: 24px;
+ text-align: center;
+ font-size: 13px;
+
+ a {
+ color: #666;
+ margin: 0 8px;
+ cursor: pointer;
+
+ &:hover {
+ color: var(--main-color);
+ }
+ }
+}
\ No newline at end of file