diff --git a/src/components/common/Sidebar.vue b/src/components/common/Sidebar.vue
index 0a9e3c2..4e16bf1 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 4a425c3..7160f71 100644
--- a/src/components/page/Login.vue
+++ b/src/components/page/Login.vue
@@ -9,8 +9,8 @@
-
-
+
+
@@ -19,13 +19,13 @@
type="password"
placeholder="请输入密码"
v-model="param.password"
- @keyup.enter.native="submitForm()"
+ @keyup.enter.native="submitForm('param')"
>
- 忘记密码?
+
- 马上登录
+ 马上登录
+
+ 马上登录
+
+
+
@@ -48,23 +67,32 @@ export default {
data: function() {
return {
param: {
- username: '',
- password: '',
+ username: 'admin',
+ password: 'admin'
},
rules: {
- username: [{ required: true, message: '请输入账号', trigger: 'blur' }],
+ 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
@@ -82,6 +110,9 @@ export default {
// this.$message.error('该用户没有权限');
// }
}).catch(res => {});
+ } else {
+ this.$message.error('请输入账号和密码');
+ return false;
}
});
},
diff --git a/src/components/page/PersonalCenter.vue b/src/components/page/PersonalCenter.vue
index 4723f40..cb3aed2 100644
--- a/src/components/page/PersonalCenter.vue
+++ b/src/components/page/PersonalCenter.vue
@@ -1004,6 +1004,7 @@ export default {