Processador
AMD Ryzen 5 5600
Memória RAM
16GB DDR4 3200MHz
Placa de Vídeo
RTX 3050 6GB 96bit
Armazenamento
NVMe 500GB Spatium MSI
Fonte
KCAS 600W SELO 80 PLUS
Gabinete
mATX Mid Tower Custom Lateral em Vidro
const btnAdd5600 = document.getElementById('btn-add-5600');
btnAdd5600.addEventListener('click', () => {
const adicionarWin = document.getElementById('add-win-5600').checked;
const urlProdutoOriginal = 'https://www.ciainfor.com.br/carrinho/produto/369103192/adicionar';
const urlProdutoGamer = 'carrinho/produto/350312986/adicionar';
const originalText = btnAdd5600.innerHTML;
const loadingText = btnAdd5600.getAttribute('data-loading-text');
btnAdd5600.innerHTML = loadingText;
btnAdd5600.disabled = true;
function postProduto(url, body = null) {
return fetch(url, {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: body ? JSON.stringify(body) : null,
credentials: 'include'
}).then(res => {
if (!res.ok) throw new Error(`Erro ao adicionar produto: ${url}`);
return res.json();
});
}
Promise.all([
postProduto(urlProdutoOriginal),
postProduto(urlProdutoGamer, {windows: adicionarWin})
])
.then(() => {
alert('Produtos adicionados ao carrinho com sucesso!');
location.reload();
})
.catch((err) => {
console.error(err);
alert('Erro ao adicionar os produtos ao carrinho.');
btnAdd5600.innerHTML = originalText;
btnAdd5600.disabled = false;
});
});