MCPcopy Create free account
hub / github.com/Semporia/Scripts / doTask

Function doTask

activity/jd_nian_wechat.js:115–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113}
114
115async function doTask() {
116 for (let item of $.taskVos) {
117 if (item.taskType === 9) {
118 if (item.status === 1) {
119 console.log(`准备做此任务:${item.taskName}`)
120 for (let task of item.shoppingActivityVos) {
121 if (task.status === 1) {
122 await collectScore(item.taskId, task.itemId, 1);
123 await $.wait(10*1000)
124 await collectScore(item.taskId, task.itemId);
125 }
126 }
127 } else if(item.status===2){
128 console.log(`${item.taskName}已做完`)
129 }
130 }
131 }
132}
133
134function getHomeData(info=false) {
135 return new Promise((resolve) => {

Callers 1

jdNianFunction · 0.70

Calls 3

collectScoreFunction · 0.70
logMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected