diff --git a/src/router/index.js b/src/router/index.js index 8b53d4d..db8bc1b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -4,7 +4,7 @@ import { constantRouterMap, asyncRouterMap } from '@/config/router.config' // hack router push callback const originalPush = Router.prototype.push -Router.prototype.push = function push (location, onResolve, onReject) { +Router.prototype.push = function push(location, onResolve, onReject) { if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject) return originalPush.call(this, location).catch(err => err) } @@ -12,8 +12,8 @@ Router.prototype.push = function push (location, onResolve, onReject) { Vue.use(Router) export default new Router({ - mode: 'history', - base: process.env.BASE_URL, + mode: 'hash', // history + // base: process.env.BASE_URL, scrollBehavior: () => ({ y: 0 }), routes: constantRouterMap.concat(asyncRouterMap) })