Commit 0b396786 authored by luo ying's avatar luo ying

修改首页

parent af778faa
......@@ -239,6 +239,7 @@
},
handleReload () {
// 针对缓存的页面也生效
console.log('针对缓存的页面也生效',this.$route.name)
const isCurrentPageCache = this.keepAlive.indexOf(this.$route.name) > -1;
const pageName = this.$route.name;
if (isCurrentPageCache) {
......
......@@ -110,6 +110,7 @@ export default {
Id: id
};
this.$http.sysUser.getuserinfo(parma).then(res => {
console.log('登录页',res.result)
if (res.result) {
if (
res.result.avatarUrl &&
......@@ -128,7 +129,8 @@ export default {
});
// setUserInfo
this.$store.commit("setUserInfo", info);
this.$router.replace(this.$route.query.redirect || "/");
this.$router.replace('/welcome')
// this.$router.replace(this.$route.query.redirect || "/");
} else {
this.$Message.error("用户信息22查询失败!");
}
......
......@@ -14,16 +14,15 @@ export default {
},
meta,
component: BasicLayout,
children: [
{
path: 'console',
name: `${pre}console`,
meta: {
...meta,
title: '主控台',
closable: false
},
component: () => import('@/pages/dashboard/console')
}
]
};
children: [{
path: 'console',
name: `${pre}console`,
meta: {
...meta,
title: '主控台',
closable: false
},
component: () =>
import ('@/pages/dashboard/console')
}]
};
\ No newline at end of file
......@@ -5,8 +5,7 @@ import BasicLayout from '@/layouts/basic-layout';
* 在主框架内显示22222222222222
*/
const frameIn = [
{
const frameIn = [{
path: '/',
// redirect: {
// name: ''
......@@ -14,6 +13,7 @@ const frameIn = [
// },
component: BasicLayout,
children: [
{
path: 'index',
name: 'index',
......@@ -32,7 +32,8 @@ const frameIn = [
title: '前端日志',
auth: true
},
component: () => import('@/pages/system/log')
component: () =>
import ('@/pages/system/log')
},
{
path: '/hello',
......@@ -41,7 +42,8 @@ const frameIn = [
title: 'hello',
auth: true
},
component: () => import('@/pages/system/log')
component: () =>
import ('@/pages/system/log')
},
// 刷新页面 必须保留
{
......@@ -49,7 +51,7 @@ const frameIn = [
name: 'refresh',
hidden: true,
component: {
beforeRouteEnter (to, from, next) {
beforeRouteEnter(to, from, next) {
next(instance => instance.$router.replace(from.fullPath));
},
render: h => h()
......@@ -61,7 +63,7 @@ const frameIn = [
name: 'redirect',
hidden: true,
component: {
beforeRouteEnter (to, from, next) {
beforeRouteEnter(to, from, next) {
next(instance => instance.$router.replace(JSON.parse(from.params.route)));
},
render: h => h()
......@@ -84,7 +86,8 @@ const frameOut = [
meta: {
title: '$t:page.login.title'
},
component: () => import('@/pages/account/login')
component: () =>
import ('@/pages/account/login')
},
// 注册
{
......@@ -93,7 +96,8 @@ const frameOut = [
meta: {
title: '$t:page.register.title'
},
component: () => import('@/pages/account/register')
component: () =>
import ('@/pages/account/register')
},
// 注册结果
{
......@@ -103,7 +107,8 @@ const frameOut = [
auth: true,
title: '注册结果'
},
component: () => import('@/pages/account/register/result')
component: () =>
import ('@/pages/account/register/result')
}
];
......@@ -111,14 +116,14 @@ const frameOut = [
* 错误页面
*/
const errorPage = [
{
const errorPage = [{
path: '/403',
name: '403',
meta: {
title: '403'
},
component: () => import('@/pages/system/error/403')
component: () =>
import ('@/pages/system/error/403')
},
{
path: '/500',
......@@ -126,7 +131,8 @@ const errorPage = [
meta: {
title: '500'
},
component: () => import('@/pages/system/error/500')
component: () =>
import ('@/pages/system/error/500')
},
{
path: '*',
......@@ -134,7 +140,8 @@ const errorPage = [
meta: {
title: '404'
},
component: () => import('@/pages/system/error/404')
component: () =>
import ('@/pages/system/error/404')
}
];
......@@ -146,4 +153,4 @@ export default [
...frameIn,
...frameOut,
...errorPage
];
];
\ No newline at end of file
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