save code
This commit is contained in:
+6
-1
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user