From 99a398c7349ce1cafe7510d14be44da1948e9fce Mon Sep 17 00:00:00 2001 From: smallfawn <101914820+smallfawn@users.noreply.github.com> Date: Sat, 25 Nov 2023 18:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E7=9A=84=E4=BC=9A=E5=91=98=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 尝试修复多账户报错 --- wx_midea.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wx_midea.js b/wx_midea.js index bc2dc8f..a3dcc95 100644 --- a/wx_midea.js +++ b/wx_midea.js @@ -89,13 +89,16 @@ class UserInfo { } async function start() { - let taskall = []; +const tasks = userList.map(user => user.main()); +await Promise.all(tasks); + + /*let taskall = []; for (let user of userList) { if (user.ckStatus) { taskall.push(await user.main()); } } - await Promise.all(taskall); + await Promise.all(taskall);*/ } !(async () => {