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

Function getJdFactory

jd_get_share_code.js:64–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 $.done();
63 })
64function getJdFactory() {
65 return new Promise(resolve => {
66 $.post(
67 taskPostUrl("jdfactory_getTaskDetail", {}, "jdfactory_getTaskDetail"),
68 async (err, resp, data) => {
69 try {
70 if (err) {
71 console.log(`${JSON.stringify(err)}`);
72 console.log(`$东东工厂 API请求失败,请检查网路重试`);
73 } else {
74 if (safeGet(data)) {
75 data = JSON.parse(data);
76 if (data.data.bizCode === 0) {
77 $.taskVos = data.data.result.taskVos; //任务列表
78 $.taskVos.map((item) => {
79 if (item.taskType === 14) {
80 console.log(
81 `【京东账号${$.index}(${$.UserName})东东工厂】${item.assistTaskDetailVo.taskToken}`
82 );
83 }
84 });
85 }
86 }
87 }
88 } catch (e) {
89 $.logErr(e, resp);
90 } finally {
91 resolve();
92 }
93 }
94 );
95 })
96}
97function getJxFactory(){
98 const JX_API_HOST = "https://m.jingxi.com";
99

Callers 1

getShareCodeFunction · 0.85

Calls 5

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

Tested by

no test coverage detected