From 7a3c64981cdb0eda52ce1e6dd90edadbacf27fdb Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Fri, 6 May 2022 07:16:18 +0800 Subject: [PATCH] fixed tally issue --- src/views/Governance.vue | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/views/Governance.vue b/src/views/Governance.vue index 6541c747..1a5909a5 100644 --- a/src/views/Governance.vue +++ b/src/views/Governance.vue @@ -260,18 +260,9 @@ export default { updateTally(res) { const voting = res.filter(i => i.status === 2) if (voting.length > 0) { - let i = 0 - Promise.all(voting.reverse().map(p => this.$http.getGovernanceTally(p.id, 0))).then(update => { - this.proposals.map(x => { - if (x.status === 2) { - const xh = x - xh.tally = update[i] - i += 1 - return xh - } - return x - }) - }) + voting.forEach(p => this.$http.getGovernanceTally(p.id, 0).then(update => { + this.$set(p, 'tally', update) + })) } }, },