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