feat: 首页配置封面图上传预览,修复系列活动跳转,活动卡片样式优化
All checks were successful
Deploy to Server / deploy (push) Successful in 1m56s
All checks were successful
Deploy to Server / deploy (push) Successful in 1m56s
This commit is contained in:
@@ -7,9 +7,8 @@ const { Title } = Typography;
|
||||
|
||||
const getImageUrl = (url) => {
|
||||
if (!url) return '';
|
||||
if (url.startsWith('http') || url.startsWith('//')) {
|
||||
try { return new URL(url).pathname; } catch { return url; }
|
||||
}
|
||||
// 外部 URL 直接返回,不提取 pathname
|
||||
if (url.startsWith('http') || url.startsWith('//')) return url;
|
||||
return url;
|
||||
};
|
||||
|
||||
|
||||
@@ -396,8 +396,7 @@ const ActivityDetail = () => {
|
||||
|
||||
{/* Hero Image with LayoutId for shared transition */}
|
||||
<div className={styles.detailHeader}>
|
||||
<motion.img
|
||||
layoutId={`activity-card-${id}`}
|
||||
<img
|
||||
src={activity.display_banner_url || cleanUrl(activity.banner_url) || activity.cover_image || 'https://images.unsplash.com/photo-1540575467063-178a50c2df87?w=800&h=600&fit=crop'}
|
||||
alt={activity.title}
|
||||
className={styles.detailImage}
|
||||
|
||||
Reference in New Issue
Block a user