From 71a77fb757ed4e8445a11efb5dfe7d7f69ecc5f8 Mon Sep 17 00:00:00 2001 From: zhiyu1998 <542716863@qq.com> Date: Mon, 1 Apr 2024 21:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20V1.6.4=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E5=8F=91=E9=80=81=E4=BA=8C=E7=BB=B4=E7=A0=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/version.yaml | 2 +- utils/bilibili.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/version.yaml b/config/version.yaml index 486d5a5..a3c4ad1 100644 --- a/config/version.yaml +++ b/config/version.yaml @@ -1,5 +1,5 @@ - { - version: 1.6.3, + version: 1.6.4, data: [ 新增B站扫码功能, diff --git a/utils/bilibili.js b/utils/bilibili.js index 94944ef..b805369 100644 --- a/utils/bilibili.js +++ b/utils/bilibili.js @@ -285,10 +285,10 @@ export async function getScanCodeData(qrcodeSavePath = 'qrcode.png', detectTime const maxAttempts = 3; let loginResp; + // 钩子函数,目前用于发送二维码给用户 + hook(); // 检测扫码情况默认 10s 检测一次,并且尝试3次,没扫就拜拜 while (code !== 0 && attemptCount < maxAttempts) { - // 钩子函数,目前用于发送二维码给用户 - hook(); loginResp = await axios.get(BILI_SCAN_CODE_DETECT.replace("{}", qrcode_key), { ...biliHeaders }); code = loginResp.data.data.code; await new Promise(resolve => setTimeout(resolve, detectTime * 1000)); // Wait for detectTime seconds