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

Function addShare

jd_mohe.js:153–176  ·  view source on GitHub ↗
(shareId)

Source from the content-addressed store, hash-verified

151 }
152}
153function addShare(shareId) {
154 return new Promise((resolve) => {
155 const url = `addShare?shareId=${shareId}&t=${Date.now()}`;
156 $.get(taskurl(url), (err, resp, data) => {
157 try {
158 if (err) {
159 console.log(`${JSON.stringify(err)}`)
160 console.log(`${$.name} API请求失败,请检查网路重试`)
161 } else {
162 console.log(`助力结果${data}`)
163 data = JSON.parse(data);
164 if (data['code'] === 200) {
165 // console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})助力好友 【${data['data']}】 成功\n`);
166 console.log(`\n助力好友 【${data['data']}】 成功\n`);
167 }
168 }
169 } catch (e) {
170 $.logErr(e, resp);
171 } finally {
172 resolve(data);
173 }
174 })
175 })
176}
177function conf() {
178 return new Promise((resolve) => {
179 const url = `conf`;

Callers 1

jd_mohe.jsFile · 0.85

Calls 4

taskurlFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected