mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2025-12-17 15:25:10 +08:00
更新阅读文章任务
This commit is contained in:
33
wx_xlxyh.js
33
wx_xlxyh.js
@@ -16,7 +16,6 @@ let envSplitor = ["&", "\n"]; //多账号分隔符
|
|||||||
let strSplitor = "#"; //多变量分隔符
|
let strSplitor = "#"; //多变量分隔符
|
||||||
let userIdx = 0;
|
let userIdx = 0;
|
||||||
let userList = [];
|
let userList = [];
|
||||||
let msg = ""
|
|
||||||
class Task {
|
class Task {
|
||||||
constructor(str) {
|
constructor(str) {
|
||||||
this.index = ++userIdx;
|
this.index = ++userIdx;
|
||||||
@@ -35,8 +34,12 @@ class Task {
|
|||||||
await this.LuckDrawApi()
|
await this.LuckDrawApi()
|
||||||
await this.ArticleListApi()
|
await this.ArticleListApi()
|
||||||
if (this.articleId !== "") {
|
if (this.articleId !== "") {
|
||||||
|
await this.ReadStartApi(this.articleId)
|
||||||
await this.LikeApi(this.articleId)
|
await this.LikeApi(this.articleId)
|
||||||
await this.ShareApi(this.articleId)
|
await this.ShareApi(this.articleId)
|
||||||
|
$.log(`模拟阅读55s`)
|
||||||
|
await $.wait(55000)
|
||||||
|
await this.ReadEndApi(this.articleId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async taskRequest(method, url, body = "") {
|
async taskRequest(method, url, body = "") {
|
||||||
@@ -76,7 +79,6 @@ class Task {
|
|||||||
} else {
|
} else {
|
||||||
$.log(`账号[${this.userId}] 获取抽奖信息失败 ${LuckDrawNumResult.message}`);
|
$.log(`账号[${this.userId}] 获取抽奖信息失败 ${LuckDrawNumResult.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
@@ -96,6 +98,33 @@ class Task {
|
|||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async ReadStartApi(articleId) {
|
||||||
|
try {
|
||||||
|
let ReadStartApi = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/enterReadDaily`, `articleId=${articleId}&userId=${this.userId}`)
|
||||||
|
if (ReadStartApi.code == 200) {
|
||||||
|
$.log(`✅账号[${this.userId}] 阅读文章开始上传成功🎉`);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$.log(`❌账号[${this.userId}] 阅读文章开始上传失败 [${ReadStartApi.message}]`);
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async ReadEndApi(articleId) {
|
||||||
|
try {
|
||||||
|
let ReadEndApi = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/exitReadDaily`, `articleId=${articleId}&userId=${this.userId}`)
|
||||||
|
if (ReadEndApi.code == 200) {
|
||||||
|
$.log(`✅账号[${this.userId}] 阅读文章结束上传成功🎉`);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$.log(`❌账号[${this.userId}] 阅读文章结束上传失败 [${ReadEndApi.message}]`);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
async ShareApi(articleId) {
|
async ShareApi(articleId) {
|
||||||
try {
|
try {
|
||||||
let ShareResult = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/shareDaily`, `articleId=${articleId}&userId=${this.userId}`)
|
let ShareResult = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/shareDaily`, `articleId=${articleId}&userId=${this.userId}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user