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

Function task0

jd_mohe.js:107–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106
107async function task0() {
108 const confRes = await conf();
109 if (confRes.code === 200) {
110 const { brandList, skuList } = confRes.data;
111 if (skuList && skuList.length > 0) {
112 for (let item of skuList) {
113 if (item.state === 0) {
114 let homeGoBrowseRes = await homeGoBrowse(0, item.id);
115 console.log('商品', homeGoBrowseRes);
116 await $.wait(1000);
117 const taskHomeCoin0Res = await taskHomeCoin(0, item.id);
118 console.log('商品领取金币', taskHomeCoin0Res);
119 // if (homeGoBrowseRes.code === 200) {
120 // await $.wait(1000);
121 // await taskHomeCoin(0, item.id);
122 // }
123 } else {
124 console.log('精选好物任务已完成')
125 }
126 }
127 }
128 }
129}
130async function task1() {
131 const confRes = await conf();
132 if (confRes.code === 200) {

Callers 1

jd_mohe.jsFile · 0.85

Calls 5

confFunction · 0.85
homeGoBrowseFunction · 0.85
taskHomeCoinFunction · 0.85
logMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected