From e55e1b2f336b845a569e047d4d47700548394583 Mon Sep 17 00:00:00 2001
From: zhuoda
- 我们开源一套漂亮的代码和一套整洁的代码规范,让大家在这浮躁的代码世界里感受到一股把代码写好的清流!同时又让开发者节省大量的时间,减少加班,快乐工作,热爱生活。 + 我们开源一套漂亮的代码和一套整洁的代码规范,让大家在这浮躁的代码世界里感受到一股把代码写好的清流!同时又让开发者节省大量的时间,减少加班,快乐工作,热爱生活。
- 你的star 是我们最强的动力,感谢支持 => +
+ 你的star 是我们最强的动力,感谢支持 !(^_^)∠※
diff --git a/front/src/router/index.js b/front/src/router/index.js
index aeaba49c..5cad7962 100644
--- a/front/src/router/index.js
+++ b/front/src/router/index.js
@@ -6,6 +6,9 @@ import iView from 'iview';
import cookie from '@/lib/cookie';
import { localRead } from '@/lib/local';
import { setTitle } from '@/lib/menu-func';
+import config from '@/config';
+
+const { homeName } = config;
Vue.use(Router);
const router = new Router({
@@ -62,8 +65,12 @@ router.beforeEach((to, from, next) => {
} else if (token && to.name === LOGIN_PAGE_NAME) {
// 已登录且要跳转的页面是登录页
next({
- name: 'home' // 跳转到home页
+ // 跳转到home页
+ name: homeName
});
+ setTitle(to, router.app);
+ iView.LoadingBar.finish();
+ window.scrollTo(0, 0);
} else {
// 特殊页面直接放行
if (to.meta.access) {