From 7f2f745410cb7c8c190a6dc99f148a742846669d Mon Sep 17 00:00:00 2001 From: luying Date: Mon, 19 Jun 2023 17:20:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E6=B4=BB=E5=8A=A8):=20?= =?UTF-8?q?=E6=9C=88=E6=97=A6=E5=9F=BA=E9=87=91=E8=B4=AD=E4=B9=B0=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E4=B9=8B=E5=90=8E=E5=8F=A6=E4=B8=80=E4=B8=AA=E5=B0=B1?= =?UTF-8?q?=E4=B8=8D=E9=9A=90=E8=97=8F=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/domain/activityField/monthlyFundField.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/shared/domain/activityField/monthlyFundField.ts b/shared/domain/activityField/monthlyFundField.ts index 3c1e649f2..d4843f671 100644 --- a/shared/domain/activityField/monthlyFundField.ts +++ b/shared/domain/activityField/monthlyFundField.ts @@ -86,7 +86,7 @@ class MonthlyFundPage { return !this.rewards.find(cur => !cur.hasReceived); } - public getShowResult() { + public canShow() { if(this.buyEndTime < Date.now() && !this.hasBought) return null; if(this.hasReceivedAll()) return null return this; @@ -129,9 +129,15 @@ export class MonthlyFundData extends ActivityBase { } public getShowResult() { + let canShow = false; + for(let list of this.list) { + if(list.canShow()) canShow = true; + } + if(!canShow) return null; + return { ...this.getBaseKeys(), - list: this.list.map(data => data.getShowResult()).filter(cur => cur) + list: this.list } } } \ No newline at end of file