🐞 fix(活动): 月旦基金购买一个之后另一个就不隐藏了
This commit is contained in:
@@ -86,7 +86,7 @@ class MonthlyFundPage {
|
|||||||
return !this.rewards.find(cur => !cur.hasReceived);
|
return !this.rewards.find(cur => !cur.hasReceived);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getShowResult() {
|
public canShow() {
|
||||||
if(this.buyEndTime < Date.now() && !this.hasBought) return null;
|
if(this.buyEndTime < Date.now() && !this.hasBought) return null;
|
||||||
if(this.hasReceivedAll()) return null
|
if(this.hasReceivedAll()) return null
|
||||||
return this;
|
return this;
|
||||||
@@ -129,9 +129,15 @@ export class MonthlyFundData extends ActivityBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getShowResult() {
|
public getShowResult() {
|
||||||
|
let canShow = false;
|
||||||
|
for(let list of this.list) {
|
||||||
|
if(list.canShow()) canShow = true;
|
||||||
|
}
|
||||||
|
if(!canShow) return null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...this.getBaseKeys(),
|
...this.getBaseKeys(),
|
||||||
list: this.list.map(data => data.getShowResult()).filter(cur => cur)
|
list: this.list
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user