mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
gacha
This commit is contained in:
parent
0c72964b12
commit
51fb65cdb4
11 changed files with 313 additions and 56 deletions
|
|
@ -40,6 +40,18 @@ export class SingleGachaLog {
|
|||
this.rank_type = rank_type;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {SingleGachaLog} item
|
||||
*/
|
||||
equals(item) {
|
||||
return (
|
||||
this.uid === item.uid &&
|
||||
this.gacha_id === item.gacha_id &&
|
||||
this.gacha_type === this.gacha_type
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +71,22 @@ export class ZZZGachaLogResp {
|
|||
const { page, size, list, region, region_time_zone } = data;
|
||||
this.page = page;
|
||||
this.size = size;
|
||||
this.list = list;
|
||||
this.list = list.map(
|
||||
item =>
|
||||
new SingleGachaLog(
|
||||
item.uid,
|
||||
item.gacha_id,
|
||||
item.gacha_type,
|
||||
item.item_id,
|
||||
item.count,
|
||||
item.time,
|
||||
item.name,
|
||||
item.lang,
|
||||
item.item_type,
|
||||
item.rank_type,
|
||||
item.id
|
||||
)
|
||||
);
|
||||
this.region = region;
|
||||
this.region_time_zone = region_time_zone;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue