我为用户创建了一个注册页面,当用户单击注册按钮时,我想将输入的注册详细信息存储到FireStore。它没有显示任何错误,但是数据没有存储在Firestore中。我的JavaScript文件是:
var config = {
apiKey: "AIzaSyAJsAstiMsrB2QGJyoqiTELw0vsWFVVahw",
authDomain: "websignin-79fec.firebaseapp.com",
databaseURL: "https://websignin-79fec.firebaseio.com",
projectId: "websignin-79fec",
storageBucket: "",
messagingSenderId: "480214472501"
};
firebase.initializeApp(config);
var db=firebase.firestore();
const inputTextfield = document.querySelector("#firstname").value;// it takes the values from signup page.
const lastname = document.querySelector("#lastname").value;
const email = document.querySelector("#email").value;
const phonenumber = document.querySelector("#phone").value;
//const savebutton=document.querySelector("#submit");
console.log(inputTextfield);
const save=document.querySelector("#submit");
save.addEventListener("click",function() {
db.collection("deyaPayusers").add({
Name:inputTextfield,
Email:email,
PhoneNo:phonenumber,
laseName:lastname,
}).then(function() {
console.log("Document successfully wriiten!");
})
.catch(function(error) {
// The document probably doesn't exist.
console.error("Error writing document: ", error);
});
});
Run Code Online (Sandbox Code Playgroud)
我的注册页面是:
<!doctype html> …Run Code Online (Sandbox Code Playgroud) 我想在用户单击我的 ios 应用程序中的将卡片添加到钱包按钮时显示苹果钱包添加卡片页面。如何从ios应用调用苹果钱包。我在我的 ios 应用程序中启用了钱包功能,并为我的应用程序生成了钱包权限。如何使用 Swift 使用 PKAddPaymentPassViewControler。请给出一些想法