【VUE】Redirected when going from "/" to "/login" via a navigation guard.

/*解决*/


const a = Router.prototype.push;

Router.prototype.push =function push(location, onResolve, onReject) {

if (onResolve || onReject)return a.call(this, location, onResolve, onReject);

return a.call(this, location).catch(err => err);

}

你可能感兴趣的:(【VUE】Redirected when going from "/" to "/login" via a navigation guard.)