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

Function submitCode

jd_sgmh.js:348–370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

346}
347//提交互助码
348function submitCode() {
349 return new Promise(async resolve => {
350 $.get({url: `http://www.helpu.cf/jdcodes/submit.php?code=${myInviteCode}&type=sgmh`, timeout: 10000}, (err, resp, data) => {
351 try {
352 if (err) {
353 console.log(`${JSON.stringify(err)}`)
354 console.log(`${$.name} API请求失败,请检查网路重试`)
355 } else {
356 if (data) {
357 //console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
358 data = JSON.parse(data);
359 }
360 }
361 } catch (e) {
362 $.logErr(e, resp)
363 } finally {
364 resolve(data);
365 }
366 })
367 await $.wait(15000);
368 resolve()
369 })
370}
371function TotalBean() {
372 return new Promise(async resolve => {
373 const options = {

Callers 1

Calls 4

getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected