From 265921b7b8f52ae15f610379fa8ec27d16dab2ff Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 14 May 2026 13:18:46 +0800 Subject: [PATCH] fix(route): normalize Bilibili mall image URLs --- lib/routes/bilibili/mall-new.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/bilibili/mall-new.ts b/lib/routes/bilibili/mall-new.ts index 1c3a1895f..212da7d91 100644 --- a/lib/routes/bilibili/mall-new.ts +++ b/lib/routes/bilibili/mall-new.ts @@ -1,6 +1,8 @@ import type { Route } from '@/types'; import got from '@/utils/got'; +const resolveImageUrl = (imageUrl: string) => (imageUrl.startsWith('//') ? `https:${imageUrl}` : imageUrl); + export const route: Route = { path: '/mall/new/:category?', categories: ['social-media'], @@ -46,7 +48,7 @@ async function handler(ctx) { link: 'https://mall.bilibili.com/newdate.html?noTitleBar=1&page=new&from=new_product&loadingShow=1', item: items.map((item) => ({ title: item.name, - description: `${item.name}
${item.priceDesc ? `${item.pricePrefix}${item.priceSymbol}${item.priceDesc[0]}` : ''}

APP 内打开`, + description: `${item.name}
${item.priceDesc ? `${item.pricePrefix}${item.priceSymbol}${item.priceDesc[0]}` : ''}

APP 内打开`, link: item.itemUrlForH5, })), };