mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-09-06 07:57:06 +08:00
handle dialog about /猎头/ during startup chat
This commit is contained in:
@@ -1314,12 +1314,25 @@ async function toRecommendPage (hooks) {
|
|||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
await waitAndHandleChatSuccess()
|
await waitAndHandleChatSuccess()
|
||||||
}
|
}
|
||||||
else if (res.zpData.bizCode === 1 && res.zpData.bizData?.chatRemindDialog?.blockLevel === 0 && /剩\d+次沟通机会/.test(res.zpData.bizData?.chatRemindDialog?.content)) {
|
else if (
|
||||||
|
res.zpData.bizCode === 1 &&
|
||||||
|
res.zpData.bizData?.chatRemindDialog?.blockLevel === 0 &&
|
||||||
|
/剩\d+次沟通机会/.test(res.zpData.bizData?.chatRemindDialog?.content)
|
||||||
|
) {
|
||||||
const confirmButton = await page.waitForSelector('.chat-block-dialog .chat-block-footer .sure-btn')
|
const confirmButton = await page.waitForSelector('.chat-block-dialog .chat-block-footer .sure-btn')
|
||||||
await confirmButton.click()
|
await confirmButton.click()
|
||||||
const nextRes = await waitAddFriendResponse()
|
const nextRes = await waitAddFriendResponse()
|
||||||
await handleAddFriendResponse(nextRes)
|
await handleAddFriendResponse(nextRes)
|
||||||
}
|
}
|
||||||
|
else if (
|
||||||
|
res.zpData.bizCode === 1 &&
|
||||||
|
/猎头/.test(res.zpData.bizData?.chatRemindDialog?.content)
|
||||||
|
) {
|
||||||
|
const confirmButton = await page.waitForSelector(`xpath///*[contains(@class, "chat-block-dialog")]//*[contains(@class, "chat-block-footer")]//*[contains(text(), "继续")]`)
|
||||||
|
await confirmButton.click()
|
||||||
|
const nextRes = await waitAddFriendResponse()
|
||||||
|
await handleAddFriendResponse(nextRes)
|
||||||
|
}
|
||||||
else if (
|
else if (
|
||||||
res.zpData.bizCode === 1 &&
|
res.zpData.bizCode === 1 &&
|
||||||
res.zpData.bizData?.chatRemindDialog?.blockLevel === 0 &&
|
res.zpData.bizData?.chatRemindDialog?.blockLevel === 0 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user