🎈 perf(活动): 神州探秘购买添加次数参数
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user