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

Function submitCode

jd_cash.js:383–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

381//提交互助码
382
383function submitCode() {
384
385 return new Promise(async resolve => {
386
387 $.get({url: `http://www.helpu.cf/jdcodes/submit.php?code=${myInviteCode}&type=cash`, timeout: 10000}, (err, resp, data) => {
388
389 try {
390
391 if (err) {
392
393 console.log(`${JSON.stringify(err)}`)
394
395 console.log(`${$.name} API请求失败,请检查网路重试`)
396
397 } else {
398
399 if (data) {
400
401 //console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
402
403 data = JSON.parse(data);
404
405 }
406
407 }
408
409 } catch (e) {
410
411 $.logErr(e, resp)
412
413 } finally {
414
415 resolve(data);
416
417 }
418
419 })
420
421 await $.wait(15000);
422
423 resolve()
424
425 })
426
427}
428//格式化助力码
429function shareCodesFormat() {
430 return new Promise(async resolve => {

Callers 1

indexFunction · 0.70

Calls 4

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

Tested by

no test coverage detected