提交优化更新

This commit is contained in:
super
2026-05-29 16:49:18 +08:00
parent 2ed1250604
commit 225d13fb6e
36 changed files with 370 additions and 220 deletions
@@ -17,6 +17,18 @@
</div>
</div>
<div class="condition-card">
<div class="section-title">检测条件</div>
<label class="switch-row">
<span>
<strong>图片检测</strong>
<em>开启后请求 Coze 时携带 img_switch=true</em>
</span>
<input v-model="imgSwitch" type="checkbox" />
<i></i>
</label>
</div>
<div class="run-row">
<button type="button" class="btn-run" :disabled="parsing || !uploadedFiles.length" @click="parseFiles">
{{ parsing ? '解析中...' : '解析并创建任务' }}
@@ -171,6 +183,7 @@ type TaskSummary = Pick<SimilarAsinParseVo, 'taskId' | 'totalRows' | 'acceptedRo
const queuedTaskSummary = ref<TaskSummary | null>(null)
const parsing = ref(false)
const pushing = ref(false)
const imgSwitch = ref(false)
const queuePayloadText = ref('')
const pollingTaskIds = ref<number[]>([])
const pendingFileTaskIds = ref<number[]>([])
@@ -374,7 +387,7 @@ async function parseFiles() {
originalFilename: f.originalFilename,
relativePath: f.relativePath,
}))
const res = await parseSimilarAsin(files, effectiveCozeApiKey())
const res = await parseSimilarAsin(files, effectiveCozeApiKey(), imgSwitch.value)
parseResult.value = res
queuedTaskSummary.value = null
queuePayloadText.value = ''
@@ -874,6 +887,16 @@ onUnmounted(() => {
.right-panel { flex: 1; min-width: 0; background: #1a1a1a; display: flex; flex-direction: column; }
.section-title, .subsection-title { font-size: 13px; color: #bbb; margin-bottom: 10px; }
.upload-zone { border: 1px dashed #3a3a3a; border-radius: 10px; padding: 18px; background: #252525; margin-bottom: 18px; }
.condition-card { margin-bottom: 18px; padding: 14px 16px; border: 1px solid #2f3a34; border-radius: 10px; background: linear-gradient(135deg, #222a25, #202020); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #d8e4dc; cursor: pointer; user-select: none; }
.switch-row span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.switch-row strong { font-size: 13px; font-weight: 600; }
.switch-row em { color: #8d9a91; font-size: 12px; font-style: normal; line-height: 1.4; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { position: relative; width: 46px; height: 24px; flex: 0 0 auto; border-radius: 999px; background: #3a3a3a; box-shadow: inset 0 0 0 1px #4b4b4b; transition: background .2s ease, box-shadow .2s ease; }
.switch-row i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c7c7c7; transition: transform .2s ease, background .2s ease; }
.switch-row input:checked + i { background: #27ae60; box-shadow: inset 0 0 0 1px #42d17a; }
.switch-row input:checked + i::after { transform: translateX(22px); background: #fff; }
.hint, .loading-msg, .files, .muted { color: #888; font-size: 12px; line-height: 1.5; }
.link { color: #6ea8fe; text-decoration: none; }
.link:hover { color: #9fc5ff; }