| 1550 | } |
| 1551 | |
| 1552 | function TotalMoney() { |
| 1553 | merge.TotalMoney = {}; |
| 1554 | return new Promise(resolve => { |
| 1555 | if (disable("TotalMoney")) return resolve() |
| 1556 | $nobyda.get({ |
| 1557 | url: 'https://api.m.jd.com/client.action?functionId=cash_exchangePage&body=%7B%7D&build=167398&client=apple&clientVersion=9.1.9&openudid=1fce88cd05c42fe2b054e846f11bdf33f016d676&sign=762a8e894dea8cbfd91cce4dd5714bc5&st=1602179446935&sv=102', |
| 1558 | headers: { |
| 1559 | Cookie: KEY |
| 1560 | } |
| 1561 | }, (error, response, data) => { |
| 1562 | try { |
| 1563 | if (error) throw new Error(error); |
| 1564 | const cc = JSON.parse(data) |
| 1565 | const Details = LogDetails ? "response:\n" + data : ''; |
| 1566 | if (cc.code == 0 && cc.data && cc.data.bizCode == 0 && cc.data.result) { |
| 1567 | console.log("\n京东-总现金查询成功 " + Details) |
| 1568 | merge.TotalMoney.TMoney = cc.data.result.totalMoney || 0 |
| 1569 | } else { |
| 1570 | console.log("\n京东-总现金查询失败 " + Details) |
| 1571 | } |
| 1572 | } catch (eor) { |
| 1573 | $nobyda.AnError("账户现金-查询", "TotalMoney", eor, response, data) |
| 1574 | } finally { |
| 1575 | resolve() |
| 1576 | } |
| 1577 | }) |
| 1578 | if (out) setTimeout(resolve, out) |
| 1579 | }); |
| 1580 | } |
| 1581 | |
| 1582 | function disable(Val, name, way) { |
| 1583 | const read = $nobyda.read("JD_DailyBonusDisables") |