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

Function getCoin

jd_crazy_joy.js:427–449  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

425}
426
427function getCoin() {
428 return new Promise(async resolve => {
429 $.get(taskUrl('crazyJoy_joy_produce'), async (err, resp, data) => {
430 try {
431 if (err) {
432 console.log(`${JSON.stringify(err)}`)
433 console.log(`${$.name} API请求失败,请检查网路重试`)
434 } else {
435 if (safeGet(data)) {
436 data = JSON.parse(data);
437 if (data.data && data.data.totalCoinAmount) {
438 $.coin = data.data.totalCoinAmount;
439 }
440 }
441 }
442 } catch (e) {
443 $.logErr(e, resp)
444 } finally {
445 resolve();
446 }
447 })
448 })
449}
450//领取解锁等级奖励(京豆)
451function getGrowthReward() {
452 return new Promise(async resolve => {

Callers 1

jdCrazyJoyFunction · 0.70

Calls 5

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

Tested by

no test coverage detected