(ids)
| 240 | |
| 241 | async function getApplyStateByActivityIds() { |
| 242 | function opt(ids) { |
| 243 | return new Promise((resolve, reject) => { |
| 244 | $.get(taskurl(`${selfDomain}/getApplyStateByActivityIds?activityIds=${ids.join(',')}`), (err, resp, data) => { |
| 245 | try { |
| 246 | if (err) { |
| 247 | console.log(`🚫 ${arguments.callee.name.toString()} API请求失败,请检查网路\n${JSON.stringify(err)}`) |
| 248 | } else { |
| 249 | data = JSON.parse(data) |
| 250 | ids.length = 0 |
| 251 | for (let apply of data) ids.push(apply.activityId) |
| 252 | } |
| 253 | } catch (e) { |
| 254 | reject(`⚠️ ${arguments.callee.name.toString()} API返回结果解析出错\n${e}\n${JSON.stringify(data)}`) |
| 255 | } finally { |
| 256 | $.goodList = $.goodList.filter(good => { |
| 257 | for (let id of ids) { |
| 258 | if (id == good.id) { |
| 259 | return false |
| 260 | } |
| 261 | } |
| 262 | return true |
| 263 | }) |
| 264 | resolve() |
| 265 | } |
| 266 | }) |
| 267 | }) |
| 268 | } |
| 269 | |
| 270 | let list = [] |
| 271 | for (let good of $.goodList) { |
no test coverage detected