mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
fix: gacha
This commit is contained in:
parent
550f7e0d99
commit
7455033ba6
4 changed files with 36 additions and 14 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { getSquareAvatar, getSquareBangboo } from '../lib/download.js';
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
|
|
@ -39,6 +41,8 @@ export class SingleGachaLog {
|
|||
this.item_type = item_type;
|
||||
this.rank_type = rank_type;
|
||||
this.id = id;
|
||||
|
||||
this.square_icon = '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -52,6 +56,17 @@ export class SingleGachaLog {
|
|||
this.gacha_type === this.gacha_type
|
||||
);
|
||||
}
|
||||
|
||||
async get_assets() {
|
||||
if (this.item_type === '音擎') {
|
||||
} else if (this.item_type === '邦布') {
|
||||
const result = await getSquareBangboo(this.item_id);
|
||||
this.square_icon = result;
|
||||
} else {
|
||||
const result = await getSquareAvatar(this.item_id);
|
||||
this.square_icon = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue