(snapshot)
| 1580 | } |
| 1581 | |
| 1582 | async function step6SwitchToOneTimeCodeLogin(snapshot) { |
| 1583 | const switchTrigger = snapshot?.switchTrigger || findOneTimeCodeLoginTrigger(); |
| 1584 | if (!switchTrigger || !isActionEnabled(switchTrigger)) { |
| 1585 | return createStep6RecoverableResult('missing_one_time_code_trigger', normalizeStep6Snapshot(inspectLoginAuthState()), { |
| 1586 | message: '当前登录页没有可用的一次性验证码登录入口。', |
| 1587 | }); |
| 1588 | } |
| 1589 | |
| 1590 | log('步骤 6:已检测到一次性验证码登录入口,准备切换...'); |
| 1591 | const loginVerificationRequestedAt = Date.now(); |
| 1592 | await humanPause(350, 900); |
| 1593 | simulateClick(switchTrigger); |
| 1594 | log('步骤 6:已点击一次性验证码登录'); |
| 1595 | await sleep(1200); |
| 1596 | return waitForStep6SwitchTransition(loginVerificationRequestedAt); |
| 1597 | } |
| 1598 | |
| 1599 | async function step6LoginFromPasswordPage(payload, snapshot) { |
| 1600 | const currentSnapshot = normalizeStep6Snapshot(snapshot || inspectLoginAuthState()); |
no test coverage detected