Closed John0Winston closed 1 year ago
当项目有base路径时,例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 部署完毕后此时部分页面跳转报404、 需修改的地方有
router/index.js中 history: createWebHistory=> history: createWebHistory(import.meta.env.BASE_URL) utils/request.js中 location.href = '/index'; =>location.href = import.meta.env.BASE_URL + 'index'; layout/components/Navbar.vue 中 location.href = '/index'; =>location.href = import.meta.env.BASE_URL + 'index';
router/index.js中 history: createWebHistory=> history: createWebHistory(import.meta.env.BASE_URL)
utils/request.js中 location.href = '/index'; =>location.href = import.meta.env.BASE_URL + 'index';
layout/components/Navbar.vue 中 location.href = '/index'; =>location.href = import.meta.env.BASE_URL + 'index';
项目技术相关的问题请到 https://gitee.com/y_project/RuoYi-Vue/issues 提问,同时提供出能复现问题步骤。
第一次用这玩意 不怎么清楚怎么使用
当项目有base路径时,例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 部署完毕后此时部分页面跳转报404、 需修改的地方有