fix: gacha

This commit is contained in:
bietiaop 2024-07-09 17:20:11 +08:00
parent 550f7e0d99
commit 7455033ba6
4 changed files with 36 additions and 14 deletions

View file

@ -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;
}
}
}
/**