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

Function task1

jd_mohe.js:130–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128 }
129}
130async function task1() {
131 const confRes = await conf();
132 if (confRes.code === 200) {
133 const { brandList, skuList } = confRes.data;
134 if (brandList && brandList.length > 0) {
135 for (let item of brandList) {
136 if (item.state === 0) {
137 let homeGoBrowseRes = await homeGoBrowse(1, item.id);
138 // console.log('店铺', homeGoBrowseRes);
139 await $.wait(1000);
140 const taskHomeCoin1Res = await taskHomeCoin(1, item.id);
141 console.log('店铺领取金币', taskHomeCoin1Res);
142 // if (homeGoBrowseRes.code === 200) {
143 // await $.wait(1000);
144 // await taskHomeCoin(1, item.id);
145 // }
146 } else {
147 console.log('精选店铺-任务已完成')
148 }
149 }
150 }
151 }
152}
153function addShare(shareId) {
154 return new Promise((resolve) => {
155 const url = `addShare?shareId=${shareId}&t=${Date.now()}`;

Callers 1

jd_mohe.jsFile · 0.85

Calls 5

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

Tested by

no test coverage detected