feat: card

This commit is contained in:
bietiaop 2024-07-09 10:30:33 +08:00
parent cd0793655d
commit ce3c509cd9
43 changed files with 508 additions and 7 deletions

View file

@ -1,3 +1,5 @@
import { getSquareBangboo } from '../lib/download.js';
/**
* @class
*/
@ -19,6 +21,11 @@ export class Buddy {
this.level = level;
this.star = star;
}
async get_assets() {
const result = await getSquareBangboo(this.id);
this.square_icon = result;
}
}
/**
@ -39,6 +46,11 @@ export class Item {
this.level = level;
this.star = star;
}
async get_assets() {
const result = await getSquareBangboo(this.id);
this.square_icon = result;
}
}
/**
@ -67,4 +79,10 @@ export class ZZZBangbooResp {
this.items = items;
this.bangboo_wiki = bangboo_wiki;
}
async get_assets() {
for (const item of this.items) {
await item.get_assets();
}
}
}