我得到了一些奇怪的东西,我的应用程序使用Angular和Firestore在本地主机上工作正常,但当它投入生产时,上面的函数进入.then,但也进入.catch错误,它不能继续。
login(email:string,password:string){
this.email=email;
this.afAuth.auth.signInWithEmailAndPassword(email,password)
.then(value => {
console.log('Nice, it worked!');
this.navigate();
})
.catch(err => {
Swal.fire({
type: 'info',
title: 'Información:',
text: 'Revisa por favor la contraseña o correo ingresado',
footer: 'no coinciden!'
});
});
}如有任何帮助,请:)
发布于 2019-07-10 19:41:02
您应该登录err以查看其消息包含的内容。然后可能会重新抛出它或返回一个被拒绝的承诺,因为如果出现错误,login()不应该返回成功。
https://stackoverflow.com/questions/56969914
复制相似问题