From 4a36a9d0def51c364b6b42a2246da3b176b56a60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0?= <15071126431@163.com>
Date: Wed, 28 Apr 2021 10:26:34 +0800
Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/common/Sidebar.vue | 3 ++
src/components/page/Login.vue | 56 +++++++++++++++++++-------
src/components/page/PersonalCenter.vue | 1 +
3 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue
index 276da7e..ebb7ceb 100644
--- a/src/components/common/Sidebar.vue
+++ b/src/components/common/Sidebar.vue
@@ -145,6 +145,9 @@ export default {
.sidebar-el-menu:not(.el-menu--collapse) {
width: 100%;
}
+.el-menu.el-menu--horizontal{
+ border-bottom: none;
+}
.sidebar > ul {
height: 100%;
}
diff --git a/src/components/page/Login.vue b/src/components/page/Login.vue
index 2559e64..3dd9ec4 100644
--- a/src/components/page/Login.vue
+++ b/src/components/page/Login.vue
@@ -9,23 +9,23 @@
-
-
+
+
-
+
- 忘记密码?
+
- 马上登录
+ 马上登录
+
+ 马上登录
+
+
+
@@ -49,22 +68,31 @@ export default {
return {
param: {
username: 'admin',
- password: 'admin',
+ password: 'admin'
},
rules: {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
password: [{ required: true, message: '请输入密码', trigger: 'blur' }],
},
- activeName: 'first'
+ phoneParam: {
+ userphone: '',
+ phonePassword: ''
+ },
+ phoneRules: {
+ userphone: [{ required: true, message: '请输入手机号/邮箱', trigger: 'blur' }],
+ phonePassword: [{ required: true, message: '请输入密码', trigger: 'blur' }],
+ },
+ activeName: '0'
};
},
methods: {
- submitForm() {
- this.$refs.login.validate(valid => {
+ submitForm(form) {
+ this.$refs[form].validate(valid => {
if (valid) {
let data = {
- account: this.param.username,
- password: this.param.password
+ account: this.activeName == '0' ? this.param.username : this.phoneParam.userphone,
+ password: this.activeName == '0' ? this.param.password : this.phoneParam.phonePassword,
+ source: this.activeName
}
this.$get(this.api.logins,data).then(res => {
let data = res.message.retvalue
diff --git a/src/components/page/PersonalCenter.vue b/src/components/page/PersonalCenter.vue
index f1c1e5e..fca10c7 100644
--- a/src/components/page/PersonalCenter.vue
+++ b/src/components/page/PersonalCenter.vue
@@ -1024,6 +1024,7 @@ export default {