亲爱的
Am使用@ ionic-native / Firebase-x v10.2和Cordova插件v5.28
为Android 9构建它。
以下是我正在使用的功能:
this.firebase.verifyPhoneNumber(phone, 60).then((credential) => {
console.log("otp_send_success", credential);
this.verfificationId = credential.verificationId;
this.translate.get('sending_otp_success').subscribe(value => {
this.showToast(value);
});
this.otpNotSent = false;
this.dismissLoading();
this.createInterval();
}).catch((error) => {
console.log("otp_send_fail", error);
this.otpNotSent = true;
this.resendCode = true;
this.dismissLoading();
this.translate.get('sending_otp_fail').subscribe(value => {
this.showToast(value);
});
});
在模拟器上运行时出现以下错误
vendor.js:1823 ERROR TypeError: Object(...) is not a function
at FirebaseX.verifyPhoneNumber (vendor.js:98221)
at OtpPage.webpackJsonp.156.OtpPage.sendOtpPhone (main.js:191)
at OtpPage.webpackJsonp.156.OtpPage.sendOTP (main.js:150)
at OtpPage.webpackJsonp.156.OtpPage.ionViewDidEnter (main.js:100)
at ViewController._lifecycle (vendor.js:23121)
at ViewController._didEnter (vendor.js:23030)
at NavControllerBase._didEnter (vendor.js:58564)
at NavControllerBase._transitionFinish (vendor.js:58374)
at vendor.js:58360
at t.invoke (polyfills.js:3)
我在做什么错了?