如图,我把 views/dataScreening/DataScreening 页面,设置成首页,登录以后自动跳转到这个页面
实现代码:
文件:/src/config/router.config.js
import { UserLayout, TabLayout, RouteView, BlankLayout, PageView } from '@/components/layouts'
/**
* 走菜单,走权限控制
* @type {[null,null]}
*/
export const asyncRouterMap = [
{
path: '/dataScreening/dataScreening',
name: 'dataScreening',
component: () => import('@/views/dataScreening/DataScreening'),
meta: { title: '数据总览' },
children: []
},
{
path: '*', redirect: '/404', hidden: true
}
]
找到文件:/src/views/user/Login.vue,loginSuccess 方法里面的路径设置成dataScreening页面。
//登录成功
loginSuccess () {
th