add the logic to close "set security question tip modal" in mainLoop of core

This commit is contained in:
geekgeekrun
2024-03-14 09:19:13 +08:00
parent 17ec7f3a65
commit f534c56af8

View File

@@ -120,6 +120,20 @@ export async function mainLoop (hooks) {
await storeStorage(page).catch(() => void 0)
}
// check set security question tip modal
let setSecurityQuestionTipModelProxy = await page.$('.dialog-wrap.dialog-account-safe')
if (
setSecurityQuestionTipModelProxy
) {
await sleep(1000)
setSecurityQuestionTipModelProxy = await page.$('.dialog-wrap.dialog-account-safe')
const closeButtonProxy = await setSecurityQuestionTipModelProxy?.$('.close')
if (setSecurityQuestionTipModelProxy && closeButtonProxy) {
await closeButtonProxy.click()
}
}
const INIT_START_EXCEPT_JOB_INDEX = 1
let currentExceptJobIndex = INIT_START_EXCEPT_JOB_INDEX
afterPageLoad: while (true) {