let lib = require("./lib.js") let FaSongXiHuanShiPin = function () { // if (!lib.page.chat.clickInputSendTxt()) { // toastLog("没有找到输入框") // return false // } if (!lib.page.chat.clickBtnMore()) { toastLog("没有找到更多按钮") return false } if (!lib.page.chat.clickBtnMyLove()) { toastLog("没有找到我的喜欢按钮") return false } if (!lib.page.chat.clickBtnMyLoveFirstProduct()) { toastLog("没有找到第一个我的喜欢视频") return false } if (!lib.page.chat.clickBtnMyLoveSend()) { toastLog("没有找到发送按钮") return false } back() return true } let FaSongMoShengRenWenBen = function () { // let msg = "您好,我是 {user} 诊室,主任看到了您的关注,有什么可以帮到您的?也可以加一下方便了解您的详细情况哦。" // msg = msg.replace("{user}", "小猪佩奇") // if (!lib.page.chat.clickInputSendTxt()) { // toastLog("没有找到输入框") // return false // } let hellos = lib.store.hello().split("\n").filter((i) => i.trim().length > 0) if (hellos.length == 0) { toastLog("没有找到问候语") back() return false } //random one // let hello = hellos[Math.floor(Math.random() * hellos.length)] let hello = hellos[new Date().getTime() % hellos.length] lib.page.chat.sendText(hello) back() sleep(500) return true } module.exports = { FaSongXiHuanShiPin, FaSongMoShengRenWenBen, }