11
This commit is contained in:
@@ -24,12 +24,11 @@ globalThis.__nodejsMain = async function main(params) {
|
||||
return { success: false, message: `不支持的平台: ${platform}` };
|
||||
}
|
||||
|
||||
const page = await newLoginPage(platform, accountId, cookies);
|
||||
await page.goto(targetUrl, { waitUntil: "domcontentloaded", timeout: 60000 });
|
||||
try {
|
||||
await page.bringToFront();
|
||||
} catch {
|
||||
/* ignore */
|
||||
globalThis.__native?.emitProgress?.("正在打开浏览器…");
|
||||
const page = await newLoginPage(platform, accountId, cookies, targetUrl);
|
||||
const cur = page.url();
|
||||
if (!cur || cur === "about:blank" || !cur.includes("://")) {
|
||||
await page.goto(targetUrl, { waitUntil: "domcontentloaded", timeout: 60000 });
|
||||
}
|
||||
await detachLoginBrowser(platform, accountId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user