(data)
| 455 | }) |
| 456 | } |
| 457 | function safeGet(data) { |
| 458 | try { |
| 459 | if (typeof JSON.parse(data) == "object") { |
| 460 | return true; |
| 461 | } |
| 462 | } catch (e) { |
| 463 | console.log(e); |
| 464 | console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); |
| 465 | return false; |
| 466 | } |
| 467 | } |
| 468 | function taskUrl(function_id, body = {}) { |
| 469 | return { |
| 470 | url: `${JD_API_HOST}&functionId=${function_id}&clientVersion=8.0.0&client=m&body=${escape(JSON.stringify(body))}&t=${Date.now()}`, |
no test coverage detected