🚑 修复商品图标显示

This commit is contained in:
HibiKier 2025-01-07 14:47:46 +08:00
parent 2c798a6cd8
commit 1a61247f05

View File

@ -35,8 +35,10 @@ async def html_image() -> bytes:
if goods[1].icon:
path = ICON_PATH / goods[1].icon
if path.exists():
icon = "data:image/png;base64,"
f"{BuildImage.open(ICON_PATH / goods[1].icon).pic2bs4()[9:]}"
icon = (
"data:image/png;base64,"
f"{BuildImage.open(ICON_PATH / goods[1].icon).pic2bs4()[9:]}"
)
partition_dict[goods[1].partition].append(
{
"id": goods[0],