fix: prefer direct login browser access with proxy fallback

This commit is contained in:
Rixuan Shao
2026-08-25 11:35:20 +08:00
parent 63443fda67
commit 4dd58ecb80
10 changed files with 335 additions and 23 deletions
+11
View File
@@ -448,9 +448,20 @@
if (retries > 1 && workspace.state === "active") {
if (qrStatus) qrStatus.textContent = "浏览器正在生成二维码,继续等待...";
refreshLoginQr(1400, retries - 1);
} else if (qrStatus) {
qrStatus.textContent = "登录页面在规定时间内没有生成二维码,请稍后重试。";
}
return;
}
if (response.status === 409) {
if (qrStatus) qrStatus.textContent = "二维码已过期,请点击刷新二维码。";
return;
}
if (response.status === 502) {
const data = await response.json().catch(() => ({}));
if (qrStatus) qrStatus.textContent = data.error || "无法访问抖音创作者中心,请检查服务器网络出口。";
return;
}
if (!response.ok) throw new Error(String(response.status));
const blob = await response.blob();
const previous = qrImage.dataset.objectUrl || "";