问题描述
在为餐厅项目工作时,用户使用一个包含他的ID和预订ID的QrCode,然后在柜台进行扫描。
这是我正在使用的示例代码:
componentDidMount() {
const fbdbStartRef=firebase.firestore().collection("users");
const nameFilter=NamesearchInput ? (fbdbStartRef.where("firstName","==",NamesearchInput)):fbdbStartRef;
const expertiseFilter= ExpertiseSearchInput ? (nameFilter.where("Expertise",ExpertiseSearchInput)):nameFilter;
const locationFilter=LocationSearchInput ? (expertiseFilter.where( "Location",LocationSearchInput)): expertiseFilter;
console.log("location filter",locationFilter)
locationFilter.get().then((querySnapshot) => {
const mentorlistLastnameFromDB = [];
querySnapshot.forEach((doc) => {
mentorlistLastnameFromDB.push({
first: doc.data().firstName,last: doc.data().lastName,location: doc.data().Location,expertise: doc.data().Expertise,profilepic: doc.data().profilePicUrl,userID:doc.data().userID,});
console.log("mentor list from db 0",mentorlistLastnameFromDB)
});
this.setState({
mentorListAll: mentorlistLastnameFromDB,});
console.log("mentor list",mentorlistLastnameFromDB)
});
}
render() {
return (
<FlatList
data={this.state.mentorListAll}
renderItem={
({ item,index }) => {
return (
<Text { documentid:item.userID}/ >
/>
它向我显示了一个包含要插入的数据的图像。问题是我想将这些图像存储在将保留在服务器上的文件夹中。 PS:稍后将通过智能手机应用程序扫描这些图像,稍后我将对其进行启动。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)