Commit 21035ab7 by wangyalan-git

文档下载,搜索,最新上传,下载排行

parent 0b8330a0
......@@ -24,13 +24,16 @@ a:link,a:visited,a:hover { text-decoration:none;} //未访问:蓝色、无下
//align-items: center;
//background: #dcdcdc;
}
img{
object-fit: contain;
}
.input-width{
width: 500px;
}
.container{
width: 1200px;
margin: 0 auto;
//padding: 4% 0;
padding: 4% 0;
}
import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout/Layout'
Vue.use(VueRouter)
const routes = [
{ path: '/login', component: () => import('@/views/login/index'), hidden: true },
{ path: '/forget', component: () => import('@/views/login/forgetPwd'), hidden: true },
{ path: '/404', component: () => import('@/views/404'), hidden: true },
{
path: '/login',
name: 'login',
component: () => import('@/views/login/index'),
hidden: true
},
{
path: '/404',
component: () => import('@/views/404'),
hidden: true
},
{
path: '',
component: Layout,
......@@ -20,6 +29,11 @@ const routes = [
name: 'search',
component: () => import('@/views/search/index.vue')
}]
},
{
path: '*',
redirect: '/404',
hidden: true
}
]
......
......@@ -2,6 +2,7 @@
import axios from 'axios'
import { Message, MessageBox } from 'element-ui'
import store from '../store'
import router from '../router'
import { getToken } from '@/utils/auth'
// 创建axios实例
const service = axios.create({
......@@ -51,7 +52,10 @@ service.interceptors.response.use(
type: 'warning'
}).then(() => {
store.dispatch('FedLogOut').then(() => {
location.reload()// 为了重新实例化vue-router对象 避免bug
console.log('重新登录',router)
router.replace({
name: 'login'
})
})
})
}
......
......@@ -23,7 +23,7 @@
autoComplete="on"
placeholder="请输入用户名">
<span slot="prefix">
<i class="el-icon-user-solid"/>
<i class="el-icon-user"/>
</span>
</el-input>
</el-form-item>
......@@ -155,7 +155,7 @@ export default {
.container {
position: relative;
width: 100%;
height: 100vh;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
......@@ -168,7 +168,7 @@ export default {
.container .content {
width: 60%;
padding: 3%;
height: 70%;
height: 60%;
background: #FFFFFF;
border-radius: 10px;
display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment