适配哔哩哔哩并记录真机联调结果
接入视频搜索、评论关键词匹配和按话术绑定的多图检查,修正真机首页、播放器及新版评论界面识别。 记录楼中楼图片入口缺失时在提交前停止的结果,更新开发进度和使用说明。
This commit is contained in:
+26
-16
@@ -298,11 +298,11 @@
|
||||
<div class="phone-content">
|
||||
<div class="card">
|
||||
<h3>准备运行</h3>
|
||||
<p class="mode">抖音 · 仅浏览</p>
|
||||
<p>内容类型 1 个 · 单次 3 个视频</p>
|
||||
<progress value="0" max="3" aria-label="已处理 0 个视频,共 3 个"></progress>
|
||||
<p class="summary">已处理视频 0 / 3 · 已确认回复 0 条</p>
|
||||
<p>内容类型 · 模型服务</p>
|
||||
<p class="mode" id="task-mode">抖音 · 仅浏览</p>
|
||||
<p id="task-scope">内容类型 1 个 · 单次 3 个视频</p>
|
||||
<progress id="task-progress" value="0" max="3" aria-label="已处理 0 个视频,共 3 个"></progress>
|
||||
<p class="summary" id="task-summary">已处理视频 0 / 3 · 已确认回复 0 条</p>
|
||||
<p id="task-content-type">内容类型 · 模型服务</p>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>无障碍服务未连接</h3>
|
||||
@@ -338,9 +338,9 @@
|
||||
<div>
|
||||
<dt><label for="target-platform">平台</label></dt>
|
||||
<dd><select id="target-platform" class="control settings-input">
|
||||
<option value="douyin">抖音</option>
|
||||
<option value="xiaohongshu">小红书</option>
|
||||
<option value="bilibili">哔哩哔哩(待适配)</option>
|
||||
<option value="douyin" data-unit="视频">抖音</option>
|
||||
<option value="xiaohongshu" data-unit="笔记">小红书</option>
|
||||
<option value="bilibili" data-unit="视频">哔哩哔哩</option>
|
||||
</select></dd>
|
||||
</div>
|
||||
<div><dt><label for="search-scope">搜索范围</label></dt><dd><select id="search-scope" class="control settings-input"></select></dd></div>
|
||||
@@ -668,8 +668,7 @@
|
||||
});
|
||||
}
|
||||
platformPicker.addEventListener("change", () => {
|
||||
const notes = platformPicker.value === "xiaohongshu";
|
||||
const unit = notes ? "笔记" : "视频";
|
||||
const unit = platformPicker.selectedOptions[0].dataset.unit;
|
||||
byId("content-limit-label").textContent = `单次任务${unit}上限`;
|
||||
byId("reply-limit-label").textContent = `每条${unit}回复上限`;
|
||||
byId("reply-scope-hint").textContent = `达到回复上限或找不到更多匹配评论时,进入下一个${unit}。`;
|
||||
@@ -678,16 +677,27 @@
|
||||
byId("save-preview").addEventListener("click", () => {
|
||||
const status = byId("library-status");
|
||||
const invalid = [byId("video-limit"), byId("replies-per-video")].find(input => !input.validity.valid);
|
||||
let error = invalid ? `${invalid.labels[0].textContent}须为 1–100 的整数。` : "";
|
||||
let focus = invalid;
|
||||
if (platformPicker.value === "bilibili") {
|
||||
error = "哔哩哔哩还未适配,请选择已接入的平台。";
|
||||
focus = platformPicker;
|
||||
const error = invalid ? `${invalid.labels[0].textContent}须为 1–100 的整数。` : "";
|
||||
if (!error) {
|
||||
const platform = platformPicker.selectedOptions[0];
|
||||
const unit = platform.dataset.unit;
|
||||
const limit = byId("video-limit").valueAsNumber;
|
||||
const selectedType = pick(types, scope);
|
||||
const searchTypes = selectedType ? [selectedType] : types;
|
||||
const type = byId("task-content-type");
|
||||
const progress = byId("task-progress");
|
||||
byId("task-mode").textContent = `${platform.text} · ${byId("reply-mode").value}`;
|
||||
byId("task-scope").textContent = `内容类型 ${searchTypes.length} 个 · 单次 ${limit} 个${unit}`;
|
||||
byId("task-summary").textContent = `已处理${unit} 0 / ${limit} · 已确认回复 0 条`;
|
||||
progress.max = limit;
|
||||
progress.setAttribute("aria-label", `已处理 0 个${unit},共 ${limit} 个`);
|
||||
type.hidden = searchTypes.length === 0;
|
||||
type.textContent = searchTypes.length ? `内容类型 · ${searchTypes[0].name}` : "";
|
||||
}
|
||||
status.textContent = error || "预览配置已更新。";
|
||||
status.classList.toggle("error", Boolean(error));
|
||||
status.hidden = false;
|
||||
focus?.focus({ preventScroll: true });
|
||||
invalid?.focus({ preventScroll: true });
|
||||
status.scrollIntoView({ block: "nearest", inline: "nearest" });
|
||||
});
|
||||
redrawLibrary();
|
||||
|
||||
Reference in New Issue
Block a user