(function_id, body = {})
| 350 | } |
| 351 | |
| 352 | function plant_request(function_id, body = {}) { |
| 353 | return new Promise(async (resolve) => { |
| 354 | $.post(plant_taskUrl(function_id, body), (err, resp, data) => { |
| 355 | try { |
| 356 | if (err) { |
| 357 | console.log("种豆得豆: API查询请求失败 ‼️‼️"); |
| 358 | console.log(`function_id:${function_id}`); |
| 359 | $.logErr(err); |
| 360 | } else { |
| 361 | data = JSON.parse(data); |
| 362 | } |
| 363 | } catch (e) { |
| 364 | $.logErr(e, resp); |
| 365 | } finally { |
| 366 | resolve(data); |
| 367 | } |
| 368 | }); |
| 369 | }); |
| 370 | } |
| 371 | |
| 372 | function plant_taskUrl(function_id, body) { |
| 373 | body["version"] = "9.0.0.1"; |
no test coverage detected