diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 1569f25..fef15a3 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -4,7 +4,9 @@ "Bash(cd /d/VscodeProject/zhengte.babylonjs-sdk && npm run build 2>&1 | head -50)", "Bash(find \"D:\\\\VscodeProject\\\\zhengte.babylonjs-sdk\\\\src\" -name \"*.ts\" -type f -exec grep -l \"class Dictionary\" {} \\\\;)", "Bash(find \"D:\\\\VscodeProject\\\\zhengte.babylonjs-sdk\\\\src\" -name \"*.ts\" -type f -exec grep -l \"class.*Kernel\\\\|export.*kernel\" {} \\\\;)", - "Bash(npm run *)" + "Bash(npm run *)", + "Bash(mysql -u root -p123456 zt)", + "Bash(mysql *)" ] } } diff --git a/ScreenShot_2026-05-14_132854_476.png b/ScreenShot_2026-05-14_132854_476.png new file mode 100644 index 0000000..d8085b0 Binary files /dev/null and b/ScreenShot_2026-05-14_132854_476.png differ diff --git a/ScreenShot_2026-05-14_141911_100.png b/ScreenShot_2026-05-14_141911_100.png new file mode 100644 index 0000000..95870d7 Binary files /dev/null and b/ScreenShot_2026-05-14_141911_100.png differ diff --git a/ScreenShot_2026-05-14_160309_304.png b/ScreenShot_2026-05-14_160309_304.png new file mode 100644 index 0000000..38dd90c Binary files /dev/null and b/ScreenShot_2026-05-14_160309_304.png differ diff --git a/index.html b/index.html index 921ef19..eadc79b 100644 --- a/index.html +++ b/index.html @@ -469,7 +469,7 @@ this.classList.toggle('active'); }); }); - + let sku = "" // 单选按钮逻辑 document.querySelectorAll('.option-btn').forEach(btn => { btn.addEventListener('click', async function () { @@ -504,9 +504,18 @@ // 百叶模型替换逻辑 // if (categoryName === "louver") { const currentText = this.textContent; - console.log(currentText); + const response = await fetch(`http://localhost:3001/api/product-configs/by-sku/${currentText}`); + const result = await response.json(); + if (result.code === 200) { + const { divisions, enable_placement_zone } = result.data; + // const {position_x, position_y, position_z} = data; + if (enable_placement_zone) { + sku = currentText; + await placementWall(divisions); + } + } - skuToFunc(currentText); + // skuToFunc(currentText); // } }); }); @@ -516,16 +525,7 @@ await hotspotRequest(); }) - let sku = "" - const skuToFunc = async (currentText) => { - sku = currentText; - if(currentText.includes("3m")){ - await placementWall(3); - }else{ - await placementWall(1); - } - } const hotspotRequest = async () => { try { @@ -863,7 +863,7 @@ // 将模型放置到该区域 try { - const response = await fetch(`http://localhost:3000/api/product-configs/by-sku/${sku}`); + const response = await fetch(`http://localhost:3001/api/product-configs/by-sku/${sku}`); const result = await response.json(); if (result.code === 200 && result.data) { @@ -875,7 +875,7 @@ if (event.event_type === 'change_model') { console.log(event.target_data); - const {id, name, file_url, model_control_type, category } = event.target_data; + const { id, name, file_url, model_control_type, category } = event.target_data; console.log('替换百叶模型:', event); console.log('替换百叶模型类型:', category); @@ -892,7 +892,7 @@ modelControlType: model_control_type, drag: { enable: true, - axis: Math.abs((rotation.y-0)) <90 ? 'x' : 'z', + axis: Math.abs((rotation.y - 0)) < 90 ? 'x' : 'z', step: 0.1, }, transform: {