From ba128ed8d6cfbb9a55e207b12599897bec70cf1a Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Fri, 10 Apr 2026 01:09:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E7=9A=84=E6=97=B6=E9=97=B4=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- background.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/background.js b/background.js index a842e94..673f9f4 100644 --- a/background.js +++ b/background.js @@ -1865,12 +1865,12 @@ async function pollFreshVerificationCode(step, state, mail, pollOverrides = {}) } let lastError = null; - let filterAfterTimestamp = pollOverrides.filterAfterTimestamp ?? getVerificationPollPayload(step, state).filterAfterTimestamp; + const filterAfterTimestamp = pollOverrides.filterAfterTimestamp ?? getVerificationPollPayload(step, state).filterAfterTimestamp; const maxRounds = pollOverrides.maxRounds || VERIFICATION_POLL_MAX_ROUNDS; for (let round = 1; round <= maxRounds; round++) { if (round > 1) { - filterAfterTimestamp = await requestVerificationCodeResend(step); + await requestVerificationCodeResend(step); } const payload = getVerificationPollPayload(step, state, { @@ -1947,13 +1947,13 @@ async function resolveVerificationStep(step, state, mail, options = {}) { rejectedCodes.add(state[stateKey]); } - let nextFilterAfterTimestamp = options.filterAfterTimestamp ?? null; + const nextFilterAfterTimestamp = options.filterAfterTimestamp ?? null; const requestFreshCodeFirst = Boolean(options.requestFreshCodeFirst); const maxSubmitAttempts = 3; if (requestFreshCodeFirst) { try { - nextFilterAfterTimestamp = await requestVerificationCodeResend(step); + await requestVerificationCodeResend(step); await addLog(`步骤 ${step}:已先请求一封新的${getVerificationCodeLabel(step)}验证码,再开始轮询邮箱。`, 'warn'); } catch (err) { await addLog(`步骤 ${step}:首次重新获取验证码失败:${err.message},将继续使用当前时间窗口轮询。`, 'warn'); @@ -1977,7 +1977,7 @@ async function resolveVerificationStep(step, state, mail, options = {}) { throw new Error(`步骤 ${step}:验证码连续失败,已达到 ${maxSubmitAttempts} 次重试上限。`); } - nextFilterAfterTimestamp = await requestVerificationCodeResend(step); + await requestVerificationCodeResend(step); await addLog(`步骤 ${step}:提交失败后已请求新验证码(${attempt + 1}/${maxSubmitAttempts})...`, 'warn'); continue; }