登录页优化,消息提示优化
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
<i class="el-icon-menu icon-collapse" @click="leftCollapse = !leftCollapse"></i>
|
||||
<el-popover placement="bottom" width="600" trigger="click" v-model="userMessagePopVisible">
|
||||
<el-badge :is-dot="haveNotReadUserMessage" slot="reference" style="line-height: 20px;margin-right: 20px;">
|
||||
<i class="el-icon-bell head-icon" @click="" style="margin-right: 0;"></i>
|
||||
<i class="el-icon-bell head-icon" @click="loadUserMessageList" style="margin-right: 0;"></i>
|
||||
</el-badge>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<span style="font-size: 14px;font-weight: bold;">通知</span>
|
||||
@@ -213,6 +213,7 @@
|
||||
userMessagePopVisible: false,
|
||||
userMsgTotalCount: 0,
|
||||
userMsgParam: {
|
||||
sysType: 2,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
@@ -287,7 +288,7 @@
|
||||
this.loadUserMessageList();
|
||||
});
|
||||
}
|
||||
if (row.msgType >= 2 && row.msgType <= 11) {
|
||||
if (row.msgType >= 2 && row.msgType <= 12) {
|
||||
this.$router.push({path: '/page/show', query: {pageId: row.dataId}});
|
||||
this.userMessagePopVisible = false;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import OpenLayout from './components/layouts/ShareLayout'
|
||||
|
||||
let routes = [
|
||||
{path: '/', redirect: '/home'},
|
||||
{path: '/user/login', name: 'WIKI-系统登录', component: () => import('@/views/user/Login')},
|
||||
{path: '/page/search', name: 'WIKI-全局搜索', component: () => import('@/views/page/Search')},
|
||||
{path: '/common/noAuth', name: 'WIKI-没有权限', component: () => import('@/views/common/NoAuth')},
|
||||
{path: '/page/editorTest', name: '编辑内容', component: () => import('@/views/page/EditorTest')},
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
<template>
|
||||
<div style="padding-top: 50px;">
|
||||
<el-form :model="loginParam" :rules="loginRules" ref="loginParam" label-position="left" label-width="0px"
|
||||
class="demo-ruleForm login-container">
|
||||
<h3 class="title">系统登录</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input type="text" v-model="loginParam.username" auto-complete="off" placeholder="账号" @keyup.enter="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input type="password" v-model="loginParam.password" auto-complete="off" placeholder="密码" @keyup.enter="loginSubmit"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button type="primary" style="width:100%;" @click.native.prevent="loginSubmit" :loading="logining">登录</el-button>
|
||||
<!--<el-button @click.native.prevent="handleReset2">重置</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import userApi from '../../common/api/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
logining: false,
|
||||
redirect: '',
|
||||
loginParam: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{required: true, message: '请输入账号', trigger: 'blur'},
|
||||
],
|
||||
password: [
|
||||
{required: true, message: '请输入密码', trigger: 'blur'},
|
||||
]
|
||||
},
|
||||
checked: true
|
||||
};
|
||||
},
|
||||
mounted: function () {
|
||||
this.redirect = this.$route.query.redirect;
|
||||
},
|
||||
methods: {
|
||||
loginSubmit() {
|
||||
this.$refs.loginParam.validate((valid) => {
|
||||
if (!valid) return;
|
||||
userApi.userLogin(this.loginParam).then(() => {
|
||||
if (!!this.redirect) {
|
||||
location.href = decodeURIComponent(this.redirect);
|
||||
} else {
|
||||
this.$router.back();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.login-container {
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
background-clip: padding-box;
|
||||
margin: 0 auto;
|
||||
width: 350px;
|
||||
padding: 35px 35px 15px 35px;
|
||||
background: #fff;
|
||||
border: 1px solid #eaeaea;
|
||||
box-shadow: 0 0 25px #cac6c6;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0px auto 40px auto;
|
||||
text-align: center;
|
||||
color: #505458;
|
||||
}
|
||||
|
||||
.remember {
|
||||
margin: 0px 0px 35px 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user