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

Function TotalSteel

JD_DailyBonus.js:1418–1446  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1416}
1417
1418function TotalSteel() {
1419 merge.TotalSteel = {};
1420 return new Promise(resolve => {
1421 if (disable("TSteel")) return resolve()
1422 $nobyda.get({
1423 url: 'https://coin.jd.com/m/gb/getBaseInfo.html',
1424 headers: {
1425 Cookie: KEY
1426 }
1427 }, (error, response, data) => {
1428 try {
1429 if (error) throw new Error(error);
1430 const Details = LogDetails ? "response:\n" + data : '';
1431 if (data.match(/(\"gbBalance\":\d+)/)) {
1432 console.log("\n" + "京东-总钢镚查询成功 " + Details)
1433 const cc = JSON.parse(data)
1434 merge.TotalSteel.TSteel = cc.gbBalance
1435 } else {
1436 console.log("\n" + "京东-总钢镚查询失败 " + Details)
1437 }
1438 } catch (eor) {
1439 $nobyda.AnError("账户钢镚-查询", "TotalSteel", eor, response, data)
1440 } finally {
1441 resolve()
1442 }
1443 })
1444 if (out) setTimeout(resolve, out)
1445 });
1446}
1447
1448function TotalBean() {
1449 merge.TotalBean = {};

Callers 1

allFunction · 0.85

Calls 3

disableFunction · 0.85
getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected