diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index f39d898..4205de1 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -177,8 +177,7 @@ Router.prototype.replace = function push(location) { } export default new Router({ - mode: 'history', // 去掉url中的# - base: process.env.NODE_ENV === 'production' ? '/' : '/', + mode: 'hash', // 使用 hash 模式,URL 会有 # scrollBehavior: () => ({ y: 0 }), routes: constantRoutes })