fix: 固定提币列表

This commit is contained in:
chaosBreaking
2019-09-08 23:32:31 +08:00
parent 5a368916b6
commit 554092a266

View File

@@ -197,15 +197,15 @@ module.exports = {
};
}),
async getWithdrawCoinsList (req, res) {
const { userId } = res.locals.user;
const userFund = await Fund.findOne({userId}).exec();
const asset = userFund.asset;
const list = [];
(asset['vic'] >= 1000) && list.push(withdrawCoinsList[0]);
(asset['usdt'] > 0 && (!userFund.lastWithdraw.usdt || (new Date() - new Date(userFund.lastWithdraw.usdt)) / (1000 * 3600 * 24 * 7) >= 1)) && list.push(withdrawCoinsList[1]);
// const { userId } = res.locals.user;
// const userFund = await Fund.findOne({userId}).exec();
// const asset = userFund.asset;
// const list = [];
// (asset['vic'] >= 1000) && list.push(withdrawCoinsList[0]);
// (asset['usdt'] > 0 && (!userFund.lastWithdraw.usdt || (new Date() - new Date(userFund.lastWithdraw.usdt)) / (1000 * 3600 * 24 * 7) >= 1)) && list.push(withdrawCoinsList[1]);
return res.json({
code: 0,
data: list
data: withdrawCoinsList
});
},
// 查询资金,直接拉数据库,区块链的查询交给定时任务