()
| 105 | |
| 106 | |
| 107 | async 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 | } |
| 130 | async function task1() { |
| 131 | const confRes = await conf(); |
| 132 | if (confRes.code === 200) { |
no test coverage detected