This commit is contained in:
chaosBreaking
2019-09-30 13:50:34 +08:00
parent 155f62988a
commit 0de4dc8831

View File

@@ -57,10 +57,13 @@ module.exports = {
}, actionFilter).skip((+pageIndex - 1) * +pageSize).limit(+pageSize) }, actionFilter).skip((+pageIndex - 1) * +pageSize).limit(+pageSize)
.exec().then(data => { .exec().then(data => {
for (let i = 0, len = data.length; i < len; ++i) { for (let i = 0, len = data.length; i < len; ++i) {
if (typeof data.detail === 'undefined' || data.detail) { const item = data[i];
const target = data.action.detail && data.action.detail.targetAddress ? data.action.detail.targetAddress.slice(0, 5) + '*****' + data.action.detail.targetAddress.slice(-4) : ''; if (item.detail === undefined) {
const detail = +data.action.type === 3 ? `提取${data.action && data.action.detail && data.action.detail.coinId || 'vic'}${target}` : ''; item.detail = '';
data.action.detail = detail; } else {
const target = item.action && item.action.detail && item.action.detail.targetAddress ? item.action.detail.targetAddress.slice(0, 5) + '*****' + item.action.detail.targetAddress.slice(-4) : '';
const detail = +item.type === 3 && target ? `提取${item.action && item.action.detail && item.action.detail.coinId || 'VIC'}${target}` : '提取VIC';
item.detail = detail;
} }
} }
return res.json({ return res.json({