Vue js форма отправлена ​​в базу данных, но данные базы данных пусты - PullRequest
0 голосов
/ 28 марта 2020

Здравствуйте, у меня возникла проблема, когда я пу sh формы и проверяю Firebase, я вижу, что данные передаются, но данные пустые.

Я импортировал файл конфигурации Firebase в свой ProfileInfo . vue file.

import { db } from '../../config/db';

Это мой метод , который я использую.

AddProfile() {
        this.$firebaseRefs.Profile.push({
            firstName: this.profileData.firstName,
            lastName: this.profileData.lastName,
            phoneNumber: this.profileData.phoneNumber,
            adress: this.profileData.adress,
            gender: this.profileData.gender,
            personalEmail: this.profileData.personalEmail,
            companyName: this.profileData.companyName,
            chamberOfCommerceNumber: this.profileData.chamberOfCommerceNumber,
            street: this.profileData.street,
            houseNumber: this.profileData.houseNumber,
            zipCode: this.profileData.zipCode,
            location: this.profileData.location,
            companyEmail: this.profileData.companyEmail
        })
        this.profileData.firstName = '';
        this.profileData.lastName = '';
        this.profileData.phoneNumber = '';
        this.profileData.adress = '';
        this.profileData.gender = '';
        this.profileData.personalEmail = '';
        this.profileData.companyName = '';
        this.profileData.chamberOfCommerceNumber = '';
        this.profileData.street = '';
        this.profileData.houseNumber = '';
        this.profileData.zipCode = '';
        this.profileData.location = '';
        this.profileData.companyEmail = '';
        // this.$router.push('/internship')
        console.log('Added to database');
    }

Теперь данные с моего Firebare пусты:

enter image description here

...