RuoYi-Vue前后端分离去除首页

648 阅读1分钟
  1. 打开ruoyi-admin-ui,进入src/router/index.js,删除该部分
 {
   path: '',
   component: Layout,
   redirect: 'index',
   children: [
     {
       path: 'index',
       component: () => import('@/views/index'),
       name: 'Index',
       meta: { title: '首页', icon: 'dashboard', affix: true }
     }
   ]
 },
  1. 进入src/views/login.vue,修改如下
// this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); 
this.$router.push({ path: '/front/topic' || "/" }).catch(()=>{});