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

Function readShareCode

jd_cfd.js:1577–1599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1575}
1576
1577function readShareCode() {
1578 return new Promise(async resolve => {
1579 $.get({url: ``, timeout: 30 * 1000}, (err, resp, data) => {
1580 try {
1581 if (err) {
1582 //console.log(JSON.stringify(err))
1583 //console.log(`${$.name} readShareCode API请求失败,请检查网路重试`)
1584 } else {
1585 if (data) {
1586 console.log(`\n随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`)
1587 data = JSON.parse(data);
1588 }
1589 }
1590 } catch (e) {
1591 $.logErr(e, resp)
1592 } finally {
1593 resolve(data);
1594 }
1595 })
1596 await $.wait(30 * 1000);
1597 resolve()
1598 })
1599}
1600//格式化助力码
1601function shareCodesFormat() {
1602 return new Promise(async resolve => {

Callers 1

shareCodesFormatFunction · 0.70

Calls 4

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

Tested by

no test coverage detected