fix: 响应头允许token;fund里bug修复
This commit is contained in:
@@ -12,7 +12,7 @@ app.use(require('compression')());
|
|||||||
app.use(require('express').static(path.join(__dirname, '../dist'), { index: 'index.html' })); // 可以指定到 node应用之外的目录上。windows里要把 \ 换成 /。
|
app.use(require('express').static(path.join(__dirname, '../dist'), { index: 'index.html' })); // 可以指定到 node应用之外的目录上。windows里要把 \ 换成 /。
|
||||||
|
|
||||||
app.all('*', function(req, res, next) {
|
app.all('*', function(req, res, next) {
|
||||||
res.setHeader('Access-Control-Expose-Headers', 'Access-Token, Uid');
|
res.setHeader('Access-Control-Expose-Headers', 'token');
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -194,14 +194,14 @@ module.exports = {
|
|||||||
let revenueLastday = 0;
|
let revenueLastday = 0;
|
||||||
if (actions && actions.length > 0) {
|
if (actions && actions.length > 0) {
|
||||||
for (let i = actions.length; i >= 0; i--) {
|
for (let i = actions.length; i >= 0; i--) {
|
||||||
revenueLastday += actions[i] && +actions[i].amount || 0;
|
actions[i] && (revenueLastday += actions[i] && +actions[i].amount || 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 筛选有效矿晶
|
// 筛选有效矿晶
|
||||||
let activeFund = 0;
|
let activeFund = 0;
|
||||||
for (let i = fund.fundList.length; i >= 0; i--) {
|
for (let i = fund.fundList.length; i >= 0; i--) {
|
||||||
const fundItem = fund.fundList[i];
|
const fundItem = fund.fundList[i];
|
||||||
activeFund += fundItem.status === 1 ? +fundItem.amount : 0;
|
fundItem && (activeFund += fundItem.status === 1 ? +fundItem.amount : 0);
|
||||||
}
|
}
|
||||||
return res.json({
|
return res.json({
|
||||||
code: 0,
|
code: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user