From 952e10ac52f8693e11d11278db7bceae62b13271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E5=88=80=E9=B1=BC?= Date: Tue, 15 Oct 2024 20:34:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=88pref=EF=BC=9A=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=BD=91=E6=98=93=E4=BA=91=E6=89=AB=E7=A0=81=E7=99=BB=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E5=85=BC=E5=AE=B9icqq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/tools.js b/apps/tools.js index 766553a..a5391c9 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -7,6 +7,7 @@ import { Buffer } from 'node:buffer'; import fs from "node:fs"; import PQueue from 'p-queue'; import path from "path"; +import qrcode from "qrcode" import querystring from "querystring"; import { BILI_CDN_SELECT_LIST, @@ -1463,13 +1464,18 @@ async neteaseStatus(e, reck) { headers: { "User-Agent": COMMON_USER_AGENT, }, - }).then(res => { - e.reply([segment.image(res.data.data.qrimg), '请在30秒内使用网易云APP进行扫码']); + }).then(async res => { + // logger.info('扫码登录数据', res.data.data) + await mkdirIfNotExists(this.defaultPath); + const saveCodePath = `${this.defaultPath}NeteaseQrcode.png`; + await qrcode.toFile(saveCodePath,res.data.data.qrurl) + e.reply([segment.image(saveCodePath), '请在30秒内使用网易云APP进行扫码']); + // e.reply([segment.image(res.data.data.qrimg), '请在30秒内使用网易云APP进行扫码']); }) //最大轮询次数 5s/check let pollCount = 0; // 轮询计数器 - const maxPolls = 6; // 最大轮询次数 + const maxPolls = 8; // 最大轮询次数 const pollRequest = async () => { let pollUrl = autoSelectNeteaseApi + '/login/qr/check?key=' + unikey + '×tamp=' + Date.now(); From cd1780a8427fa19d3f4005d43a42052ffd641b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E5=88=80=E9=B1=BC?= Date: Tue, 15 Oct 2024 20:38:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8E=88pref=EF=BC=9A=E6=94=BE=E5=AE=BD?= =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/tools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/tools.js b/apps/tools.js index a5391c9..00b9fe9 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -1469,7 +1469,7 @@ async neteaseStatus(e, reck) { await mkdirIfNotExists(this.defaultPath); const saveCodePath = `${this.defaultPath}NeteaseQrcode.png`; await qrcode.toFile(saveCodePath,res.data.data.qrurl) - e.reply([segment.image(saveCodePath), '请在30秒内使用网易云APP进行扫码']); + e.reply([segment.image(saveCodePath), '请在40秒内使用网易云APP进行扫码']); // e.reply([segment.image(res.data.data.qrimg), '请在30秒内使用网易云APP进行扫码']); })