0

昨天一切都很好。一切都清楚地显示出来。但是今天什么都没有显示。它没有给出任何错误。只是一些奇迹。firebase 什么时候停止越野车

<template>
<div class="admin">
<h1> Hi, {{ userProfile.name }} </h1>
    
<v-row>
<v-col md="4" v-for="(user, index) in users" :key="user.id">
<v-card>
<v-img
v-if="user.image"
height="250"
:src="user.image"
lazy-src="https://via.placeholder.com/250"
>
</v-img>
<v-card-title> {{ user.name }} </v-card-title>
<v-card-text>
<p class="subtitle-1">Email: {{ user.email }}</p>
<p class="subtitle-1">Phone: {{ user.phone }}</p>
<p>{{ user.description }}</p>
</v-card-text>
<v-card-actions>
<Contacts :user="user" :index="index" /> 
<v-btn color="red">Delete</v-btn>
</v-card-actions>
</v-card>
             
    
</v-col>
</v-row>
</div>
</template>

脚本

    <script>
    import { mapState } from 'vuex'
    import Contacts from '../views/Contacts.vue'
    import { auth, storage, adminPanel } from '../firebase'
    export default {
    components: {
    Contacts
    },
    data() {
    return {
    users: []
    }
        
                
    },
    computed: {
    ...mapState(['userProfile'])
    },
        
    methods: {
    async getUsers() {
    try {
        
    const querySnapshot = await adminPanel.where('userId', '==', auth.currentUser.uid).get()
    querySnapshot.forEach( async (doc) => {
    let img = ''
    if(doc.data().image) {
    img = await storage.ref().child(doc.data().image).getDownloadURL()
    }
    this.users.push({
    id: doc.id,
    name: doc.data().name,
    email: doc.data().email,
    phone: doc.data().description,
    image: img,
    img: doc.data().image
    })
    } )
    } catch(e) {
    console.log(e)
    }
    }
    },
        
    async mounted() {
    await this.getUsers()
    }
    }
    </script>

这些是火力基地故障吗?如果是这样,如何摆脱他们给出建议?我应该怎么办?如何让它恢复正常?

4

0 回答 0