diff --git a/miniprogram/src/pages/content-detail/index.scss b/miniprogram/src/pages/content-detail/index.scss index 3ca8327..5ba542b 100644 --- a/miniprogram/src/pages/content-detail/index.scss +++ b/miniprogram/src/pages/content-detail/index.scss @@ -1,6 +1,6 @@ /* 资讯详情 · 小程序样式(微信文章式) */ .cd { position: relative; z-index: 2; padding: 0 0 60rpx; } -.cd-cover { display: block; width: 100%; border-radius: 20rpx; } +.cd-cover { width: 100%; aspect-ratio: 3.35 / 1; object-fit: cover; border-radius: 20rpx; } .cd-video { width: 100%; height: 400rpx; border-radius: 20rpx; margin-bottom: 24rpx; } .cd-title { display: block; margin-top: 24rpx; padding: 0 28rpx; font-size: 40rpx; color: #fff; font-weight: 700; line-height: 1.4; } .cd-meta-row { display: flex; align-items: center; gap: 10rpx; padding: 20rpx 28rpx 0; } diff --git a/miniprogram/src/pages/content/index.scss b/miniprogram/src/pages/content/index.scss index e20f887..aa80d42 100644 --- a/miniprogram/src/pages/content/index.scss +++ b/miniprogram/src/pages/content/index.scss @@ -39,7 +39,7 @@ /* ---------- 大图卡片 ---------- */ .ct-card { margin: 6rpx 0 18rpx; border-radius: 22rpx; overflow: hidden; background: #111116; border: 1rpx solid #222228; } -.ct-cover { position: relative; width: 100%; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; overflow: hidden; } +.ct-cover { position: relative; width: 100%; aspect-ratio: 3.35 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; } .ct-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .ct-play { position: relative; z-index: 2; } .ct-play { diff --git a/website/src/user/Content.jsx b/website/src/user/Content.jsx index a030509..c166c20 100644 --- a/website/src/user/Content.jsx +++ b/website/src/user/Content.jsx @@ -46,7 +46,7 @@ function NewsCard({ it, big }) { return ( {big && ( -
+
{img ? : null} {it.video ?
: null}
diff --git a/website/src/user/ContentDetail.jsx b/website/src/user/ContentDetail.jsx index 278225e..6b308ff 100644 --- a/website/src/user/ContentDetail.jsx +++ b/website/src/user/ContentDetail.jsx @@ -46,7 +46,7 @@ export default function ContentDetail() { return (
- {item.cover && } + {item.cover && }
{item.publisher_avatar ?