forked from M3-Academy/m3-academy-template-checkout
feat(body): Trocando as mensagens do body
This commit is contained in:
parent
e1b34faaf8
commit
710c9ad6b4
@ -2,12 +2,11 @@ import CheckoutUI from "./components/CheckoutUI";
|
||||
import { Container } from "m3-utils";
|
||||
import "slick-carousel";
|
||||
import Header from "./components/Header";
|
||||
import Body from "./components/Body";
|
||||
import Footer from "./components/Footer";
|
||||
|
||||
const m3Checkout = new Container({
|
||||
appName: "m3-checkout",
|
||||
components: [CheckoutUI, Header, Body, Footer],
|
||||
components: [CheckoutUI, Header, Footer],
|
||||
});
|
||||
|
||||
m3Checkout.start();
|
||||
|
@ -1,16 +0,0 @@
|
||||
export default class Body {
|
||||
constructor() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
async init() {
|
||||
await this.selectors();
|
||||
}
|
||||
async selectors() {
|
||||
this.titleCart = await waitElement(".empty-cart-title");
|
||||
}
|
||||
|
||||
trocaTitle() {
|
||||
this.titleCart.innerHTML = ``;
|
||||
}
|
||||
}
|
@ -14,6 +14,7 @@ export default class Footer {
|
||||
await this.renderIconCreditCards();
|
||||
await this.renderIconVtexPci();
|
||||
await this.renderIconsDeveloped();
|
||||
this.trocaTitle();
|
||||
}
|
||||
|
||||
async selectors() {
|
||||
@ -23,6 +24,9 @@ export default class Footer {
|
||||
this.footerIconsCreditCards = await waitElement(".footerCheckout__payments");
|
||||
this.footerIconVtexPci = await waitElement(".footerCheckout__vtexpci");
|
||||
this.footerIconsDeveloped = await waitElement(".footerCheckout__developedBy");
|
||||
this.titleCart = await waitElement(".empty-cart-title");
|
||||
this.subTitleCart = await waitElement(".empty-cart-message");
|
||||
this.buttonCart = await waitElement("#cart-choose-products");
|
||||
}
|
||||
|
||||
onUpdate() {
|
||||
@ -83,4 +87,11 @@ export default class Footer {
|
||||
<li><a href="https://vtex.com/br-pt/"><span>Powered By</span><img class="iconDevV" src="https://agenciamagma.vteximg.com.br/arquivos/logoVTEXM3Academy.png"/> </a></li>
|
||||
<li><a href="https://vtex.com/br-pt/"><span>Developed By</span><img class="iconDeveLM3" src="https://agenciamagma.vteximg.com.br/arquivos/logoM3M3Academy.png"/> </a></li>`;
|
||||
}
|
||||
|
||||
trocaTitle() {
|
||||
const tituloCart = document.querySelector(".empty-cart-title");
|
||||
tituloCart.innerHTML = `<h2>SEU CARRINHO ESTÁ VAZIO</h2>`;
|
||||
this.subTitleCart.innerHTML = `<p></p>`;
|
||||
this.buttonCart.innerHTML = `Continuar comprando`;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
@import "./utils/all";
|
||||
@import "./lib/slick";
|
||||
@import "./partials/header";
|
||||
@import "./partials/body";
|
||||
@import "./partials/footer";
|
||||
@import "./checkout/checkout.scss";
|
||||
|
@ -1,11 +0,0 @@
|
||||
/*#checkoutMainContainer {
|
||||
width: 100%;
|
||||
transform: translateY(-50%);
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #000000;
|
||||
}*/
|
||||
.container-cart {
|
||||
#cart-title {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
@ -99,3 +99,8 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.container-cart {
|
||||
#cart-title {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user