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

Function deskGoodsTask

jd_joy.js:125–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123}
124//逛商品得100积分奖励任务
125async function deskGoodsTask() {
126 const deskGoodsRes = await getDeskGoodDetails();
127 if (deskGoodsRes && deskGoodsRes.success) {
128 if (deskGoodsRes.data && deskGoodsRes.data.deskGoods) {
129 const { deskGoods, taskChance, followCount = 0 } = deskGoodsRes.data;
130 console.log(`浏览货柜商品 ${followCount ? followCount : 0}/${taskChance}`);
131 if (taskChance === followCount) return
132 for (let item of deskGoods) {
133 if (!item['status'] && item['sku']) {
134 await followScan(item['sku'])
135 }
136 }
137 } else {
138 console.log(`\n限时商品货架已下架`);
139 }
140 }
141}
142//参加双人赛跑
143async function joinTwoPeopleRun() {
144 joyRunFlag = $.getdata('joyRunFlag') ? $.getdata('joyRunFlag') : joyRunFlag;

Callers 1

jdJoyFunction · 0.85

Calls 3

getDeskGoodDetailsFunction · 0.85
followScanFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected