• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

若依前后端分离,页面刷新一次URL出现“//”,页面刷新两次直接404

武飞扬头像
May琳
帮助1

vue3下的若依管理系统,前后端分离,创建菜单后手动生成路由,运行后不报错,但是刷新后上方URL就会变成双/,错误原因:router配置错误。

学新通

再刷新一次就会404。

学新通

在控制台下方第一次也会警告产生了“//”

学新通

我的index.js

  1.  
    path: '/test',
  2.  
    component: Layout,
  3.  
    hidden: true,
  4.  
    children: [
  5.  
    {
  6.  
    path: 'test1',
  7.  
    component: () => import('@/views/test/test1/index'),
  8.  
    name: 'test1',
  9.  
    meta: { title: 'test1', activeMenu: '/test/test1' }
  10.  
    },
  11.  
    {
  12.  
    path: 'test2',
  13.  
    component: () => import('@/views/test/test2/index'),
  14.  
    name: 'test2',
  15.  
    meta: { title: 'test2', activeMenu: '/test/test2' }
  16.  
    },
  17.  
    {
  18.  
    path: 'test3',
  19.  
    component: () => import('@/views/test/test3/index'),
  20.  
    name: 'test3',
  21.  
    meta: { title: 'test3', activeMenu: '/eest/test3' }
  22.  
    }
学新通
  1.  
    {
  2.  
    path: 'test3',
  3.  
    component: () => import('@/views/test/test3/index'),
  4.  
    name: 'test3',
  5.  
    meta: { title: 'test3', activeMenu: '/test/test3' }
  6.  
    }

我的问题:在router下的index.js文件对test的配置错误,测试后感觉是由于大小写的问题,把所有大写换成小写就OK了。

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhghbieh
系列文章
更多 icon
同类精品
更多 icon
继续加载