添加衣服长度字段
This commit is contained in:
+49
-9
@@ -79,6 +79,31 @@
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
.option-box {
|
||||
margin: 15px 0;
|
||||
padding: 15px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.option-box label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.cloth-len-select {
|
||||
margin: 15px 0;
|
||||
}
|
||||
.cloth-len-select label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.cloth-len-select select {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -96,14 +121,31 @@
|
||||
<input type="file" id="clothInput" accept="image/*">
|
||||
<img id="clothPreview" class="image-preview" alt="衣服图片预览">
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<div class="image-upload-container">
|
||||
<div class="image-upload-box">
|
||||
<h3>裤子图片</h3>
|
||||
<input type="file" id="kuziInput" accept="image/*">
|
||||
<img id="kuziPreview" class="image-preview" alt="裤子图片预览">
|
||||
</div>
|
||||
<br>
|
||||
<div class="option-box">
|
||||
|
||||
<div class="cloth-len-select">
|
||||
<label for="clothLenSelect">选择服装长度:</label>
|
||||
<select id="clothLenSelect">
|
||||
<option value="胸">胸</option>
|
||||
<option value="腰">腰</option>
|
||||
<option value="跨">跨</option>
|
||||
<option value="大腿">大腿</option>
|
||||
<option value="膝盖">膝盖</option>
|
||||
<option value="小腿">小腿</option>
|
||||
<option value="脚踝">脚踝</option>
|
||||
<option value="拖地">拖地</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option-box">
|
||||
<label>
|
||||
<input type="checkbox" id="no2Checkbox"> 设置 no2 不要两步(一步完成)
|
||||
</label>
|
||||
@@ -115,10 +157,6 @@
|
||||
<label>
|
||||
<input type="checkbox" id="suitCheckbox"> 设置 suit(套装)
|
||||
</label>
|
||||
<!-- <label>
|
||||
<input type="checkbox" id="kuziCheckbox"> 设置 kuzi(裤子)
|
||||
</label> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="submitBtn">提交处理</button>
|
||||
@@ -179,6 +217,7 @@
|
||||
const no2 = document.getElementById("no2Checkbox").checked;
|
||||
const tuodi = document.getElementById("tuodiCheckbox").checked;
|
||||
const suit = document.getElementById("suitCheckbox").checked;
|
||||
const clothLen = document.getElementById("clothLenSelect").value;
|
||||
|
||||
|
||||
if (!humanFile || !clothFile) {
|
||||
@@ -204,8 +243,9 @@
|
||||
cloth_img: clothDataURL, // 包含完整前缀的Base64
|
||||
output_format: "url",
|
||||
no2: no2,
|
||||
tuodi:tuodi,
|
||||
suit:suit
|
||||
tuodi: tuodi,
|
||||
suit: suit,
|
||||
cloth_len: clothLen // 新增的服装长度字段
|
||||
};
|
||||
|
||||
if(kuziDataURL)
|
||||
|
||||
Reference in New Issue
Block a user