Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
La notificación del navegador FCM no funciona en Vue 3

Aquí está mi código. Hasta ahora he logrado que la notificación en segundo plano funcione. (Onmessage no funciona)

"base de fuego": "^9.6.7",

firebase-messaging-sw.js

 null

aplicación.vue

 import { initializeApp } from 'firebase/app'; import { getMessaging, getToken, onMessage } from "firebase/messaging"; const firebaseConfig = { apiKey: "AIzaSyDXnUaeAK", authDomain: "test-test.firebaseapp.com", projectId: "test-test", storageBucket: "test-test.appspot.com", messagingSenderId: "123456789", appId: "1:38296:web:j88054626", measurementId: "X-TEST" }; initializeApp(firebaseConfig); const messaging = getMessaging(); getToken(messaging, { vapidKey: 'key' }) .then((currentToken) => { console.log("currentToken", currentToken); }) onMessage(messaging, (payload) => { console.log('Message received. ', payload); // ... });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!