Javascript Firebase验证成功后不会重定向
每当我尝试登录时,都不会发生任何事情。为什么呢?我的注册帐户组件工作正常。只有当我按“登录”后页面才会刷新,并且什么也没有发生Javascript Firebase验证成功后不会重定向,javascript,firebase,vue.js,firebase-authentication,Javascript,Firebase,Vue.js,Firebase Authentication,每当我尝试登录时,都不会发生任何事情。为什么呢?我的注册帐户组件工作正常。只有当我按“登录”后页面才会刷新,并且什么也没有发生 const routes = [ { path: "/", name: "Home", component: Home }, }, methods: { logIn() { firebase.auth().signInWithEmailAndPass
const routes = [
{
path: "/",
name: "Home",
component: Home
},
},
methods: {
logIn() {
firebase.auth().signInWithEmailAndPassword(this.email, this.password)
.then(
user => {
console.log(user.data);
this.$router.replace({ path: "/" });
},
err => {
alert(err);
}