As shown in the picture, I set the views/dataScreening/DataScreening page as the home page, and automatically jump to this page after login
Implementation code:
File: /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
}
]
Find the file: /src/views/user/Login.vue, the path in the loginSuccess method is set to the dataScreening page.
//登录成功
loginSuccess () {
th