【去除若依首页】有些小项目不需要首页,去除方法

第一步

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

修改登录页

Login.vue 中 大概144行 ,注释掉原有跳转。替换为自己的跳转路径

//

//

//

//

//

//

//

//

//

//

//

//

  // this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
  this.$router.push({ path: "/xxx/xxx" || "/" }).catch(()=>{});

第二步

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

//

修改router/index.js 路由跳转

注释掉原有 / 跳转,路由重定向到想要的路径

修改router/index.js 路由跳转

注释掉原有 / 跳转,路由重定向到想要的路径

//   {
//   path: '', component: Layout, redirect: 'index', children: [{
//     path: 'index',
//     component: () => import('@/views/index.vue'),
//     name: 'Index',
//     meta: {title: '首页大屏', icon: 'dashboard', affix: true}
//   }]
// }

// 增加下方两个路由路径

{
  path: '', component: Layout, redirect: '/xxx/xxx',
}, {
  path: '/index', component: Layout, redirect: '/xxx/xxx',
}
相关推荐
xiaobai12 33 分钟前
二叉树的遍历【C++】
开发语言·c++·算法
-seventy-7 分钟前
对 JavaScript 原型的理解
javascript·原型
DieSnowK10 分钟前
[项目][WebServer][Makefile & Shell]详细讲解
开发语言·c++·http·makefile·shell·项目·webserver
Freak嵌入式10 分钟前
全网最适合入门的面向对象编程教程:50 Python函数方法与接口-接口和抽象基类
java·开发语言·数据结构·python·接口·抽象基类
冷凝女子13 分钟前
【QT】基于HTTP协议的网络应用程序
开发语言·qt·http
知识分享小能手16 分钟前
mysql学习教程,从入门到精通,SQL 删除数据(DELETE 语句)(19)
大数据·开发语言·数据库·sql·学习·mysql·数据开发
&白帝&24 分钟前
uniapp中使用picker-view选择时间
前端·uni-app
鸽芷咕25 分钟前
【Python报错已解决】libpng warning: iccp: known incorrect sRGB profile
开发语言·python·机器学习·bug
白总Server30 分钟前
MongoDB解说
开发语言·数据库·后端·mongodb·golang·rust·php
谢尔登31 分钟前
Babel
前端·react.js·node.js