MCPcopy Create free account
hub / github.com/Semporia/Scripts / getTaskList

Function getTaskList

activity/jd_nian.js:623–649  ·  view source on GitHub ↗
(body = {})

Source from the content-addressed store, hash-verified

621}
622
623function getTaskList(body = {}) {
624 return new Promise(resolve => {
625 $.post(taskPostUrl("nian_getTaskDetail", body, "nian_getTaskDetail"), async (err, resp, data) => {
626 try {
627 if (err) {
628 console.log(`${JSON.stringify(err)}`)
629 console.log(`${$.name} API请求失败,请检查网路重试`)
630 } else {
631 if (safeGet(data)) {
632 data = JSON.parse(data);
633 if (data.data.bizCode === 0) {
634 if (JSON.stringify(body) === "{}") {
635 $.taskVos = data.data.result.taskVos;//任务列表
636 console.log(`\n\n您的好友助力码为${data.data.result.inviteId}\n\n`)
637 }
638 // $.userInfo = data.data.result.userInfo;
639 }
640 }
641 }
642 } catch (e) {
643 $.logErr(e, resp)
644 } finally {
645 resolve();
646 }
647 })
648 })
649}
650
651function getFriendData(inviteId) {
652 return new Promise((resolve) => {

Callers 1

jdNianFunction · 0.70

Calls 5

taskPostUrlFunction · 0.70
safeGetFunction · 0.70
postMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected