mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🎈pref:优化网易云扫码登录,兼容icqq
This commit is contained in:
parent
c68a0b32f1
commit
952e10ac52
@ -7,6 +7,7 @@ import { Buffer } from 'node:buffer';
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import PQueue from 'p-queue';
|
import PQueue from 'p-queue';
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
import qrcode from "qrcode"
|
||||||
import querystring from "querystring";
|
import querystring from "querystring";
|
||||||
import {
|
import {
|
||||||
BILI_CDN_SELECT_LIST,
|
BILI_CDN_SELECT_LIST,
|
||||||
@ -1463,13 +1464,18 @@ async neteaseStatus(e, reck) {
|
|||||||
headers: {
|
headers: {
|
||||||
"User-Agent": COMMON_USER_AGENT,
|
"User-Agent": COMMON_USER_AGENT,
|
||||||
},
|
},
|
||||||
}).then(res => {
|
}).then(async res => {
|
||||||
e.reply([segment.image(res.data.data.qrimg), '请在30秒内使用网易云APP进行扫码']);
|
// 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
|
//最大轮询次数 5s/check
|
||||||
let pollCount = 0; // 轮询计数器
|
let pollCount = 0; // 轮询计数器
|
||||||
const maxPolls = 6; // 最大轮询次数
|
const maxPolls = 8; // 最大轮询次数
|
||||||
|
|
||||||
const pollRequest = async () => {
|
const pollRequest = async () => {
|
||||||
let pollUrl = autoSelectNeteaseApi + '/login/qr/check?key=' + unikey + '×tamp=' + Date.now();
|
let pollUrl = autoSelectNeteaseApi + '/login/qr/check?key=' + unikey + '×tamp=' + Date.now();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user