save code

This commit is contained in:
xsl
2025-08-14 10:45:10 +08:00
parent 261e44eabb
commit f420e8b86c
3 changed files with 29 additions and 9 deletions
+6 -1
View File
@@ -100,6 +100,9 @@
<label>
<input type="checkbox" id="no2Checkbox"> 设置 no2 不要两步(一步完成)
</label>
<label>
<input type="checkbox" id="tuodiCheckbox"> 设置 tuodi(拖地)
</label>
</div>
</div>
@@ -145,6 +148,7 @@
const humanFile = document.getElementById('humanInput').files[0];
const clothFile = document.getElementById('clothInput').files[0];
const no2 = document.getElementById("no2Checkbox").checked;
const tuodi = document.getElementById("tuodiCheckbox").checked;
if (!humanFile || !clothFile) {
alert('请同时选择人体图片和衣服图片!');
@@ -166,12 +170,13 @@
cloth_img: clothDataURL, // 包含完整前缀的Base64
output_format: "url",
no2: no2,
tuodi:tuodi
};
console.log("准备发送的数据:", data); // 调试用
// 调用API
fetch('http://112.126.94.241:18888/change_cloth_base64', {
fetch('http://112.126.94.241:28888/change_cloth_base64', {
method: 'POST',
headers: {
'Content-Type': 'application/json'