🎈 perf(活动): 神州探秘购买添加次数参数

This commit is contained in:
luying
2022-11-18 14:46:46 +08:00
parent 966ecd3818
commit 90a9eca039
9 changed files with 51 additions and 37 deletions
@@ -160,9 +160,13 @@ export class TreasureHuntShopItem {
}
}
public getConsume() {
let index = this.consume.findIndex(obj => { return obj && obj.count === this.buyCount + 1 });
return (index != -1) ? this.consume[index].consume : '';
public getConsume(count: number) {
let consumes: string[] = [];
for(let cnt = 1; cnt <= count; cnt ++) {
let index = this.consume.findIndex(obj => { return obj && obj.count === this.buyCount + cnt });
if (index != -1) consumes.push(this.consume[index].consume);
}
return consumes;
}
public setBuyCount(record: ActivityTreasureHuntShopModelType) {