forked from M3-Academy/m3-academy-template-checkout
feat(home):adicao do fetch
This commit is contained in:
parent
2473a6c1b9
commit
43fcbc6e1b
@ -32,9 +32,7 @@ export default class CheckoutUI {
|
|||||||
toggleFooterDropdown(event) {
|
toggleFooterDropdown(event) {
|
||||||
event.target.classList.toggle("closed");
|
event.target.classList.toggle("closed");
|
||||||
|
|
||||||
event.target.nextElementSibling.classList.toggle(
|
event.target.nextElementSibling.classList.toggle("dropdown__content--closed");
|
||||||
"dropdown__content--closed"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
@ -56,14 +54,7 @@ export default class CheckoutUI {
|
|||||||
resizeImages() {
|
resizeImages() {
|
||||||
$(".product-image img").each((i, el) => {
|
$(".product-image img").each((i, el) => {
|
||||||
const $el = $(el);
|
const $el = $(el);
|
||||||
$el.attr(
|
$el.attr("src", alterarTamanhoImagemSrcVtex($el.attr("src"), this.width, this.height));
|
||||||
"src",
|
|
||||||
alterarTamanhoImagemSrcVtex(
|
|
||||||
$el.attr("src"),
|
|
||||||
this.width,
|
|
||||||
this.height
|
|
||||||
)
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ export default class Header {
|
|||||||
await this.removeCartTitle();
|
await this.removeCartTitle();
|
||||||
await this.alterarCartChooseProducts();
|
await this.alterarCartChooseProducts();
|
||||||
await this.alterarEmptyCartTitle();
|
await this.alterarEmptyCartTitle();
|
||||||
|
await this.api();
|
||||||
}
|
}
|
||||||
|
|
||||||
async selectors() {
|
async selectors() {
|
||||||
@ -81,14 +82,15 @@ export default class Header {
|
|||||||
this.emptyCartTitle.innerHTML = "Seu carrinho está vazio";
|
this.emptyCartTitle.innerHTML = "Seu carrinho está vazio";
|
||||||
}
|
}
|
||||||
|
|
||||||
// async progressBarProgress(){
|
async api() {
|
||||||
// if(this.progressBar && window.innerWidth > 1024){
|
fetch(
|
||||||
// const progressBarLista = document.querySelectorAll("#progressBar ul li");
|
"https://m3academy.myvtex.com/api/catalog_system/pub/products/search/?fq=productClusterIds:319"
|
||||||
// progressBarLista.forEach((li) => {
|
)
|
||||||
// if(window.location.href) === "https://m3academy.myvtex.com/checkout/#/cart"{
|
.then((Response) => {
|
||||||
|
return Response.json();
|
||||||
// }
|
})
|
||||||
// })
|
.then((data) => {
|
||||||
// }
|
console.log(data);
|
||||||
// }
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,6 +178,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
font-family: "Tenor Sans", sans-serif;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
td.shipping-date {
|
td.shipping-date {
|
||||||
color: $color-gray2;
|
color: $color-gray2;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@ -190,6 +195,7 @@
|
|||||||
|
|
||||||
.product-price {
|
.product-price {
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
|
|
||||||
@include mq(md, max) {
|
@include mq(md, max) {
|
||||||
min-width: 78px;
|
min-width: 78px;
|
||||||
}
|
}
|
||||||
@ -356,7 +362,8 @@
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
color: $color-gray2;
|
color: $color-black-100;
|
||||||
|
// color: $color-gray2;
|
||||||
|
|
||||||
@include mq(md, max) {
|
@include mq(md, max) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
@ -4,8 +4,13 @@ body .container-main.container-order-form .orderform-template.active {
|
|||||||
margin-left: unset;
|
margin-left: unset;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
float: right;
|
float: right;
|
||||||
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
.orderform-template-holder {
|
.orderform-template-holder {
|
||||||
width: 66.1132%;
|
width: 66.1132%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container-main {
|
||||||
|
min-height: unset;
|
||||||
|
}
|
||||||
|
23
package-lock.json
generated
23
package-lock.json
generated
@ -17,7 +17,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@commitlint/cli": "^12.0.1",
|
"@commitlint/cli": "^12.0.1",
|
||||||
"@commitlint/config-conventional": "^12.0.1",
|
"@commitlint/config-conventional": "^12.0.1",
|
||||||
"slick-carousel": "^1.8.1"
|
"slick-carousel": "^1.8.1",
|
||||||
|
"yarn": "^1.22.19"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"concurrently": "^6.0.0",
|
"concurrently": "^6.0.0",
|
||||||
@ -45,6 +46,7 @@
|
|||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"m3-utils": "^0.1.0",
|
"m3-utils": "^0.1.0",
|
||||||
"sass": "^1.38.1",
|
"sass": "^1.38.1",
|
||||||
|
"slick-carousel": "^1.8.1",
|
||||||
"terser-webpack-plugin": "^5.1.4"
|
"terser-webpack-plugin": "^5.1.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -17668,6 +17670,19 @@
|
|||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/yarn": {
|
||||||
|
"version": "1.22.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz",
|
||||||
|
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"bin": {
|
||||||
|
"yarn": "bin/yarn.js",
|
||||||
|
"yarnpkg": "bin/yarn.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/yocto-queue": {
|
"node_modules/yocto-queue": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
@ -19345,6 +19360,7 @@
|
|||||||
"m3-utils": "^0.1.0",
|
"m3-utils": "^0.1.0",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
"sass": "^1.38.1",
|
"sass": "^1.38.1",
|
||||||
|
"slick-carousel": "^1.8.1",
|
||||||
"terser-webpack-plugin": "^5.1.4",
|
"terser-webpack-plugin": "^5.1.4",
|
||||||
"webpack": "^5.51.1",
|
"webpack": "^5.51.1",
|
||||||
"webpack-merge": "^5.8.0"
|
"webpack-merge": "^5.8.0"
|
||||||
@ -30672,6 +30688,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
|
||||||
"integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA=="
|
"integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA=="
|
||||||
},
|
},
|
||||||
|
"yarn": {
|
||||||
|
"version": "1.22.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.19.tgz",
|
||||||
|
"integrity": "sha512-/0V5q0WbslqnwP91tirOvldvYISzaqhClxzyUKXYxs07yUILIs5jx/k6CFe8bvKSkds5w+eiOqta39Wk3WxdcQ=="
|
||||||
|
},
|
||||||
"yocto-queue": {
|
"yocto-queue": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@commitlint/cli": "^12.0.1",
|
"@commitlint/cli": "^12.0.1",
|
||||||
"@commitlint/config-conventional": "^12.0.1",
|
"@commitlint/config-conventional": "^12.0.1",
|
||||||
"slick-carousel": "^1.8.1"
|
"slick-carousel": "^1.8.1",
|
||||||
|
"yarn": "^1.22.19"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user