mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-09-25 06:46:39 +08:00
v1.0.2 优化home页面的name取值方式
This commit is contained in:
parent
23c20820e2
commit
e55e1b2f33
@ -7,11 +7,11 @@
|
|||||||
</p>
|
</p>
|
||||||
<br/>
|
<br/>
|
||||||
<p style="text-align:left;font-size:16px">
|
<p style="text-align:left;font-size:16px">
|
||||||
<font color="#DC143C"><strong>我们开源一套漂亮的代码和一套整洁的代码规范</strong></font>,让大家在这浮躁的代码世界里感受到一股把代码写好的清流!同时又让开发者节省大量的时间,减少加班,快乐工作,热爱生活。
|
我们开源一套漂亮的代码和一套整洁的代码规范,让大家在这浮躁的代码世界里感受到一股把代码写好的清流!同时又让开发者节省大量的时间,减少加班,快乐工作,热爱生活。
|
||||||
</p>
|
</p>
|
||||||
<br/>
|
<br/>
|
||||||
<p style="text-align:left;font-size:16px">
|
<p style="text-align:left;font-size:20px">
|
||||||
<font color="#DC143C"><strong>你的star 是我们最强的动力,感谢支持 => </strong></font>
|
<font color="#DC143C"><strong>你的star 是我们最强的动力,感谢支持 !(^_^)∠※ </strong></font>
|
||||||
<a target="_blank" href="https://github.com/1024-lab/smart-admin">
|
<a target="_blank" href="https://github.com/1024-lab/smart-admin">
|
||||||
<img style="width: 82px;height: 20px;margin-right: 10px" alt="" src="https://img.shields.io/github/stars/1024-lab/smart-admin.svg?logo=github&style=social">
|
<img style="width: 82px;height: 20px;margin-right: 10px" alt="" src="https://img.shields.io/github/stars/1024-lab/smart-admin.svg?logo=github&style=social">
|
||||||
</a>
|
</a>
|
||||||
|
@ -6,6 +6,9 @@ import iView from 'iview';
|
|||||||
import cookie from '@/lib/cookie';
|
import cookie from '@/lib/cookie';
|
||||||
import { localRead } from '@/lib/local';
|
import { localRead } from '@/lib/local';
|
||||||
import { setTitle } from '@/lib/menu-func';
|
import { setTitle } from '@/lib/menu-func';
|
||||||
|
import config from '@/config';
|
||||||
|
|
||||||
|
const { homeName } = config;
|
||||||
|
|
||||||
Vue.use(Router);
|
Vue.use(Router);
|
||||||
const router = new Router({
|
const router = new Router({
|
||||||
@ -62,8 +65,12 @@ router.beforeEach((to, from, next) => {
|
|||||||
} else if (token && to.name === LOGIN_PAGE_NAME) {
|
} else if (token && to.name === LOGIN_PAGE_NAME) {
|
||||||
// 已登录且要跳转的页面是登录页
|
// 已登录且要跳转的页面是登录页
|
||||||
next({
|
next({
|
||||||
name: 'home' // 跳转到home页
|
// 跳转到home页
|
||||||
|
name: homeName
|
||||||
});
|
});
|
||||||
|
setTitle(to, router.app);
|
||||||
|
iView.LoadingBar.finish();
|
||||||
|
window.scrollTo(0, 0);
|
||||||
} else {
|
} else {
|
||||||
// 特殊页面直接放行
|
// 特殊页面直接放行
|
||||||
if (to.meta.access) {
|
if (to.meta.access) {
|
||||||
|
Loading…
Reference in New Issue
Block a user