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

修改首页

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