fix: 跟进实际逻辑

This commit is contained in:
手瓜一十雪 2024-09-08 18:21:55 +08:00
parent 1a6a43babf
commit 5669e2b0b7
2 changed files with 8 additions and 2 deletions

View File

@ -59,6 +59,7 @@ export interface QuickLoginResult {
}
export interface NodeIKernelLoginService {
connect(): boolean;
// eslint-disable-next-line @typescript-eslint/no-misused-new
new(): NodeIKernelLoginService;

View File

@ -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