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

Function submitCode

jd_jdfactory.js:653–675  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

651}
652//提交互助码
653function submitCode() {
654 return new Promise(async resolve => {
655 $.get({url: `http://www.helpu.cf/jdcodes/submit.php?code=${myInviteCode}&type=ddfactory`, timeout: 10000}, (err, resp, data) => {
656 try {
657 if (err) {
658 console.log(`${JSON.stringify(err)}`)
659 console.log(`${$.name} API请求失败,请检查网路重试`)
660 } else {
661 if (data) {
662 //console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
663 data = JSON.parse(data);
664 }
665 }
666 } catch (e) {
667 $.logErr(e, resp)
668 } finally {
669 resolve(data);
670 }
671 })
672 await $.wait(15000);
673 resolve()
674 })
675}
676//格式化助力码
677function shareCodesFormat() {
678 return new Promise(async resolve => {

Callers 1

jdfactory_getTaskDetailFunction · 0.70

Calls 4

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

Tested by

no test coverage detected