Upload files to "/"
This commit is contained in:
58
commande.js
Normal file
58
commande.js
Normal file
@@ -0,0 +1,58 @@
|
||||
const offres = {
|
||||
decouverte: {
|
||||
nom: "Offre Découverte",
|
||||
prix: "19€ / mois",
|
||||
avantages: [
|
||||
"Accès à la plateforme",
|
||||
"3 visites par mois",
|
||||
"Support standard"
|
||||
]
|
||||
},
|
||||
pro: {
|
||||
nom: "Offre Pro",
|
||||
prix: "79€ / mois",
|
||||
avantages: [
|
||||
"Accès illimité à la plateforme",
|
||||
"Casque VR en location",
|
||||
"Statistiques & analytics",
|
||||
"Support prioritaire"
|
||||
]
|
||||
},
|
||||
agence: {
|
||||
nom: "Offre Agence",
|
||||
prix: "149€ / mois",
|
||||
avantages: [
|
||||
"Pack 5 casques VR",
|
||||
"Interface multi-utilisateurs",
|
||||
"Accès illimité",
|
||||
"Support dédié"
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
// Lire l'offre depuis l'URL
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const offreKey = params.get("offre") || "pro";
|
||||
const offre = offres[offreKey];
|
||||
|
||||
// Sélecteurs HTML
|
||||
const card = document.querySelector(".order-card");
|
||||
const price = card.querySelector(".price");
|
||||
const list = card.querySelector("ul");
|
||||
|
||||
// Injection contenu
|
||||
card.querySelector("h3").textContent = offre.nom;
|
||||
price.textContent = offre.prix;
|
||||
|
||||
list.innerHTML = "";
|
||||
offre.avantages.forEach(item => {
|
||||
const li = document.createElement("li");
|
||||
li.textContent = "✓ " + item;
|
||||
list.appendChild(li);
|
||||
});
|
||||
|
||||
// Fake validation formulaire
|
||||
document.getElementById("orderForm").addEventListener("submit", function(e) {
|
||||
e.preventDefault();
|
||||
alert("Demande envoyée ✅\n(Ceci est une simulation pédagogique)");
|
||||
});
|
||||
Reference in New Issue
Block a user