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

Function collectCoin

jd_cfd.js:998–1015  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

996 })
997}
998function collectCoin(body) {
999 return new Promise((resolve) => {
1000 $.get(taskUrl(`user/CollectCoin`, body), (err, resp, data) => {
1001 try {
1002 if (err) {
1003 console.log(`${JSON.stringify(err)}`)
1004 console.log(`${$.name} CollectCoin API请求失败,请检查网路重试`)
1005 } else {
1006 data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]);
1007 }
1008 } catch (e) {
1009 $.logErr(e, resp);
1010 } finally {
1011 resolve(data);
1012 }
1013 })
1014 })
1015}
1016function buildLvlUp(body) {
1017 return new Promise((resolve) => {
1018 $.get(taskUrl(`user/BuildLvlUp`, body), (err, resp, data) => {

Callers 1

getBuildInfoFunction · 0.85

Calls 4

taskUrlFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected