fix: 累计挖矿收益
This commit is contained in:
@@ -233,6 +233,7 @@ module.exports = {
|
||||
let revenueLastday = calRevenueLastday(actions);
|
||||
// 筛选有效矿晶
|
||||
let activeFund = getActiveFund(fund.fundList);
|
||||
const revenueAll = fund.asset && +fund.asset['vic'] > +fund.asset['usdt'] ? +fund.asset['vic'] - +fund.asset['usdt'] : 0;
|
||||
return res.json({
|
||||
code: 0,
|
||||
msg: '刷新成功',
|
||||
@@ -241,7 +242,7 @@ module.exports = {
|
||||
basic: {
|
||||
activeFund,
|
||||
revenueLastday,
|
||||
revenueAll: fund.asset && +fund.asset['vic'] - +fund.asset['usdt'] // 总金额 - 社区奖励 = 挖矿奖励
|
||||
revenueAll
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -255,6 +256,7 @@ module.exports = {
|
||||
// 筛选有效矿晶
|
||||
let activeFund = getActiveFund(fund.fundList);
|
||||
if (!newFund || !newFund.fundList) newFund = fund;
|
||||
const revenueAll = fund.asset && +fund.asset['vic'] > +fund.asset['usdt'] ? +fund.asset['vic'] - +fund.asset['usdt'] : 0;
|
||||
return res.json({
|
||||
code: 0,
|
||||
msg: '刷新成功',
|
||||
@@ -263,7 +265,7 @@ module.exports = {
|
||||
basic: {
|
||||
activeFund, //有效矿晶
|
||||
revenueLastday, // 昨日收益
|
||||
revenueAll: +newFund.asset['vic'] - +newFund.asset['usdt'] // 累计总收益 - 社区奖励 = 挖矿奖励
|
||||
revenueAll
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -293,12 +295,13 @@ module.exports = {
|
||||
let revenueLastday = calRevenueLastday(actions);
|
||||
// 筛选有效矿晶
|
||||
let activeFund = getActiveFund(fund.fundList);
|
||||
const revenueAll = fund.asset && +fund.asset['vic'] > +fund.asset['usdt'] ? +fund.asset['vic'] - +fund.asset['usdt'] : 0;
|
||||
return res.json({
|
||||
code: 0,
|
||||
data: {
|
||||
activeFund,
|
||||
revenueLastday,
|
||||
revenueAll: fund.asset && +fund.asset['vic'] - +fund.asset['usdt'] // 总金额 - 社区奖励 = 挖矿奖励
|
||||
revenueAll // 总金额 - 社区奖励 = 挖矿奖励
|
||||
}
|
||||
});
|
||||
}).catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user