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

Function TotalSubsidy

JD_DailyBonus.js:1513–1542  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1511}
1512
1513function TotalSubsidy() {
1514 merge.TotalSubsidy = {};
1515 return new Promise(resolve => {
1516 if (disable("TotalSubsidy")) return resolve()
1517 $nobyda.get({
1518 url: 'https://ms.jr.jd.com/gw/generic/uc/h5/m/mySubsidyBalance',
1519 headers: {
1520 Cookie: KEY,
1521 Referer: 'https://active.jd.com/forever/cashback/index?channellv=wojingqb'
1522 }
1523 }, (error, response, data) => {
1524 try {
1525 if (error) throw new Error(error);
1526 const cc = JSON.parse(data)
1527 const Details = LogDetails ? "response:\n" + data : '';
1528 if (cc.resultCode == 0 && cc.resultData && cc.resultData.data) {
1529 console.log("\n京东-总金贴查询成功 " + Details)
1530 merge.TotalSubsidy.TSubsidy = cc.resultData.data.balance || 0
1531 } else {
1532 console.log("\n京东-总金贴查询失败 " + Details)
1533 }
1534 } catch (eor) {
1535 $nobyda.AnError("账户金贴-查询", "TotalSubsidy", eor, response, data)
1536 } finally {
1537 resolve()
1538 }
1539 })
1540 if (out) setTimeout(resolve, out)
1541 });
1542}
1543
1544function TotalMoney() {
1545 merge.TotalMoney = {};

Callers 1

allFunction · 0.85

Calls 3

disableFunction · 0.85
getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected