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

Function submitCode

jd_dreamFactory.js:1340–1362  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1338}
1339//提交互助码
1340function submitCode() {
1341 return new Promise(async resolve => {
1342 $.get({url: `http://www.helpu.cf/jdcodes/submit.php?code=${myInviteCode}&type=jxfactory`, timeout: 10000}, (err, resp, data) => {
1343 try {
1344 if (err) {
1345 console.log(`${JSON.stringify(err)}`)
1346 console.log(`${$.name} API请求失败,请检查网路重试`)
1347 } else {
1348 if (data) {
1349 //console.log(`随机取个${randomCount}码放到您固定的互助码后面(不影响已有固定互助)`)
1350 data = JSON.parse(data);
1351 }
1352 }
1353 } catch (e) {
1354 $.logErr(e, resp)
1355 } finally {
1356 resolve(data);
1357 }
1358 })
1359 await $.wait(15000);
1360 resolve()
1361 })
1362}
1363//格式化助力码
1364function shareCodesFormat() {
1365 return new Promise(async resolve => {

Callers 1

userInfoFunction · 0.70

Calls 4

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

Tested by

no test coverage detected