()
| 1173 | }) |
| 1174 | } |
| 1175 | async function executeNewInteractionTaskFun() { |
| 1176 | $.taskList = $.taskList.filter(vo => !!vo && vo['taskStatus'] === 0) |
| 1177 | for (let item of $.taskList) { |
| 1178 | if (item['taskId'] === 9) { |
| 1179 | console.log(`开始做:【${item['taskTitle']}】任务`) |
| 1180 | const body = {"interactionId": $.interactionId, "taskPoolId": $.taskPoolId, "taskType": item['taskId']} |
| 1181 | await executeNewInteractionTask(body); |
| 1182 | } else if (item['taskId'] === 4) { |
| 1183 | $.taskSkuInfo = $.taskSkuInfo.filter(vo => !!vo && vo['browseStatus'] === 0); |
| 1184 | console.log(`开始做:【${item['taskTitle']}】任务`) |
| 1185 | for (let v of $.taskSkuInfo) { |
| 1186 | const body = {"sku": v['skuId'], "interactionId": $.interactionId, "taskPoolId": $.taskPoolId, "taskType": item['taskId']}; |
| 1187 | await executeNewInteractionTask(body); |
| 1188 | await $.wait(100); |
| 1189 | } |
| 1190 | } else { |
| 1191 | $.shopInfoList = $.shopInfoList.filter(vo => !!vo && vo['browseStatus'] === 0); |
| 1192 | for (let v of $.shopInfoList) { |
| 1193 | console.log(`开始做:【${item['taskTitle']}】任务,需等待${v['browseTime']}秒`); |
| 1194 | let body = { |
| 1195 | "shopId": v['shopId'], |
| 1196 | "interactionId": $.interactionId, |
| 1197 | "taskPoolId": $.taskPoolId, |
| 1198 | "taskType": item['taskId'], |
| 1199 | "action": 1 |
| 1200 | }; |
| 1201 | await executeNewInteractionTask(body); |
| 1202 | await $.wait(v['browseTime'] * 1000); |
| 1203 | body = { |
| 1204 | "shopId": v['shopId'], |
| 1205 | "interactionId": $.interactionId, |
| 1206 | "taskPoolId": $.taskPoolId, |
| 1207 | "taskType": item['taskId'] |
| 1208 | }; |
| 1209 | await executeNewInteractionTask(body); |
| 1210 | } |
| 1211 | } |
| 1212 | } |
| 1213 | } |
| 1214 | function executeNewInteractionTask(body) { |
| 1215 | return new Promise(resolve => { |
| 1216 | const options = superShakePostUrl('executeNewInteractionTask', body) |
no test coverage detected