mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
fix: 跟进实际逻辑
This commit is contained in:
parent
1a6a43babf
commit
5669e2b0b7
@ -59,6 +59,7 @@ export interface QuickLoginResult {
|
||||
}
|
||||
|
||||
export interface NodeIKernelLoginService {
|
||||
connect(): boolean;
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-new
|
||||
new(): NodeIKernelLoginService;
|
||||
|
||||
|
@ -150,7 +150,12 @@ export async function NCoreInitShell() {
|
||||
};
|
||||
|
||||
loginService.addKernelLoginListener(proxiedListenerOf(loginListener, logger) as any);
|
||||
|
||||
let isConnect = loginService.connect();
|
||||
if (!isConnect) {
|
||||
logger.logError('核心登录服务连接失败!');
|
||||
return;
|
||||
}
|
||||
logger.log('核心登录服务连接成功!');
|
||||
// 实现WebUi快速登录
|
||||
loginService.getLoginList().then((res) => {
|
||||
// 遍历 res.LocalLoginInfoList[x].isQuickLogin是否可以 res.LocalLoginInfoList[x].uin 转为string 加入string[] 最后遍历完成调用WebUiDataRuntime.setQQQuickLoginList
|
||||
@ -199,7 +204,7 @@ export async function NCoreInitShell() {
|
||||
logger.log(`可用于快速登录的 QQ:\n${historyLoginList
|
||||
.map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`)
|
||||
.join('\n')
|
||||
}`);
|
||||
}`);
|
||||
}
|
||||
loginService.getQRCodePicture();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user