Kaynağa Gözat

对齐新闻网2026媒体华夏首页样式

红色二级首页子栏目“媒体华夏”改为复用主站媒体报道列表结构,保留文章缩略图、日期和标题,缩略图按主站首页显示尺寸 110px 宽、16:9 展示。

新增 HXCS 迁移,将新闻网-2026 媒体华夏栏目设为有图列表样式并保留 160x90 栏目缩略图裁剪属性,避免后台按纯文字栏目处理。

Validation:

- git diff --check -- WebRoot/web/upload/ffkj-template/college-red-index.jsp local-run/migrations/2026-08-29-007-news2026-media-thumbnail-list-style.sql
非繁 3 ay önce
ebeveyn
işleme
2c67c9d735

+ 81 - 5
WebRoot/web/upload/ffkj-template/college-red-index.jsp

@@ -76,6 +76,62 @@
 		.college-red-page .department-home-panel.is-media-grid .department-section-media-grid b {
 		.college-red-page .department-home-panel.is-media-grid .department-section-media-grid b {
 			margin-top: 0;
 			margin-top: 0;
 		}
 		}
+		.college-red-page .department-home-panel.is-home-media-report .media-report-list {
+			margin: 0;
+			padding: 7px 0 2px;
+			background: transparent;
+		}
+		.college-red-page .department-home-panel.is-home-media-report .media-report-list li {
+			flex: 0 0 auto;
+			border-bottom: 1px solid rgba(var(--hx-red-dark-rgb), 0.12);
+		}
+		.college-red-page .department-home-panel.is-home-media-report .media-report-list a {
+			grid-template-columns: 110px minmax(0, 1fr);
+			gap: 18px;
+			min-height: 86px;
+			padding: 10px 0;
+		}
+		.college-red-page .department-home-panel.is-home-media-report .media-report-thumb {
+			width: 110px;
+			border-radius: 4px;
+		}
+		.college-red-page .department-home-panel.is-home-media-report .media-report-thumb img {
+			border-radius: 4px;
+		}
+		.college-red-page .department-home-panel.is-home-media-report .screen-record-copy {
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			min-width: 0;
+		}
+		.college-red-page .department-home-panel.is-home-media-report .screen-record-date {
+			display: block;
+			margin-bottom: 4px;
+			color: var(--hx-red);
+			font-family: syh-m, "Microsoft YaHei", "PingFang SC", sans-serif;
+			font-size: 14px;
+			font-style: normal;
+			font-weight: 500;
+			line-height: 1.4;
+		}
+		.college-red-page .department-home-panel.is-home-media-report .screen-record-copy strong {
+			display: flex;
+			align-items: center;
+			overflow: hidden;
+			min-height: clamp(21px, 1.51vw, 24.7px);
+			color: #333333;
+			font-family: syh-m, "Microsoft YaHei", "PingFang SC", sans-serif;
+			font-size: var(--screen-red-record-title-size);
+			font-weight: 400;
+			line-height: 1.3;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+		}
+		.college-red-page .department-home-panel.is-home-media-report .media-report-list a:hover .screen-record-copy strong,
+		.college-red-page .department-home-panel.is-home-media-report .media-report-list a:focus-visible .screen-record-copy strong {
+			color: #b51624;
+			transform: translateX(6px);
+		}
 		.college-red-page .department-news-layout .department-news-list a {
 		.college-red-page .department-news-layout .department-news-list a {
 			position: relative;
 			position: relative;
 			display: flex;
 			display: flex;
@@ -382,14 +438,34 @@
 								<c:forEach items="${homeSectionRow}" var="homeSection">
 								<c:forEach items="${homeSectionRow}" var="homeSection">
 									<c:set var="sectionNav" value="${homeSection.navigationMap}"/>
 									<c:set var="sectionNav" value="${homeSection.navigationMap}"/>
 									<c:set var="sectionListStyleCode" value="${empty sectionNav.wnlscode ? 10000 : sectionNav.wnlscode}"/>
 									<c:set var="sectionListStyleCode" value="${empty sectionNav.wnlscode ? 10000 : sectionNav.wnlscode}"/>
-									<c:set var="sectionIsTextList" value="${sectionListStyleCode == 10000}"/>
-									<c:set var="sectionIsGraphicList" value="${sectionListStyleCode == 10010}"/>
-									<c:set var="sectionIsCarouselList" value="${sectionListStyleCode == 10020}"/>
-									<c:set var="sectionIsMediaGrid" value="${sectionListStyleCode == 10030 or sectionListStyleCode == 10050}"/>
+									<c:set var="sectionIsHomeMediaReport" value="${sectionNav.name eq '媒体华夏' or sectionNav.idcard eq 'FFKJ_NEWS2026_HOME_MEDIA'}"/>
+									<c:set var="sectionIsTextList" value="${not sectionIsHomeMediaReport and sectionListStyleCode == 10000}"/>
+									<c:set var="sectionIsGraphicList" value="${not sectionIsHomeMediaReport and sectionListStyleCode == 10010}"/>
+									<c:set var="sectionIsCarouselList" value="${not sectionIsHomeMediaReport and sectionListStyleCode == 10020}"/>
+									<c:set var="sectionIsMediaGrid" value="${not sectionIsHomeMediaReport and (sectionListStyleCode == 10030 or sectionListStyleCode == 10050)}"/>
 									<c:set var="sectionHref" value="${empty sectionNav.href ? sectionNav.url : sectionNav.href}"/>
 									<c:set var="sectionHref" value="${empty sectionNav.href ? sectionNav.url : sectionNav.href}"/>
-									<article class="department-list-panel department-home-panel ${sectionIsGraphicList ? 'is-graphic-list' : ''} ${sectionIsCarouselList ? 'is-carousel-list' : ''} ${sectionIsMediaGrid ? 'is-media-grid' : ''}">
+									<article class="department-list-panel department-home-panel ${sectionIsGraphicList ? 'is-graphic-list' : ''} ${sectionIsCarouselList ? 'is-carousel-list' : ''} ${sectionIsMediaGrid ? 'is-media-grid' : ''} ${sectionIsHomeMediaReport ? 'is-home-media-report' : ''}">
 										<div class="department-section-title"><h2>${sectionNav.name}</h2><a href="${sectionHref}" target="${sectionNav.target}">查看更多</a></div>
 										<div class="department-section-title"><h2>${sectionNav.name}</h2><a href="${sectionHref}" target="${sectionNav.target}">查看更多</a></div>
 										<c:choose>
 										<c:choose>
+											<c:when test="${sectionIsHomeMediaReport}">
+												<ul class="media-report-list">
+													<c:forEach items="${homeSection.articleList}" var="item" varStatus="vs">
+														<c:if test="${vs.count le 5}">
+															<li>
+																<a href="${item.url}" target="${item.target}">
+																	<span class="media-report-thumb">
+																		<c:choose>
+																			<c:when test="${not empty item.thumbnail}"><img src="${item.thumbnail}" alt="${item.title}"></c:when>
+																			<c:otherwise><em>暂无缩略图</em></c:otherwise>
+																		</c:choose>
+																	</span>
+																	<span class="screen-record-copy"><em class="screen-record-date">${fn:substring(item.release_time, 0, 10)}</em><strong>${item.title}</strong></span>
+																</a>
+															</li>
+														</c:if>
+													</c:forEach>
+												</ul>
+											</c:when>
 											<c:when test="${sectionIsCarouselList}">
 											<c:when test="${sectionIsCarouselList}">
 												<div class="department-section-carousel" aria-label="${sectionNav.name}轮播">
 												<div class="department-section-carousel" aria-label="${sectionNav.name}轮播">
 													<c:forEach items="${homeSection.articleList}" var="item" varStatus="vs">
 													<c:forEach items="${homeSection.articleList}" var="item" varStatus="vs">

+ 64 - 0
local-run/migrations/2026-08-29-007-news2026-media-thumbnail-list-style.sql

@@ -0,0 +1,64 @@
+-- Set News2026 "媒体华夏" as a thumbnail-required list while keeping the homepage render consistent with hxcs.feifan.net.
+
+SET NAMES utf8mb4;
+USE sp_gzhx_apps;
+
+START TRANSACTION;
+
+SET @news2026_site_id := (
+  SELECT websiteid
+  FROM website
+  WHERE dcode = 61
+    AND name = '新闻网-2026'
+    AND FIND_IN_SET('xinwen2026.hxcs.feifan.net', REPLACE(TRIM(BOTH ';' FROM IFNULL(domains, '')), ';', ',')) > 0
+  ORDER BY websiteid
+  LIMIT 1
+);
+
+SET @news2026_media_nav_id := (
+  SELECT navigationid
+  FROM website_navigation
+  WHERE websiteid = @news2026_site_id
+    AND dcode = 61
+    AND name = '媒体华夏'
+    AND (
+      idcard = 'FFKJ_NEWS2026_HOME_MEDIA'
+      OR url = '/meiti/'
+    )
+  ORDER BY (idcard = 'FFKJ_NEWS2026_HOME_MEDIA') DESC, navigationid
+  LIMIT 1
+);
+
+SET @guard_sql := IF(
+  @news2026_site_id IS NOT NULL
+    AND @news2026_media_nav_id IS NOT NULL,
+  'SELECT 1',
+  'SELECT * FROM __news2026_media_nav_missing__'
+);
+PREPARE guard_stmt FROM @guard_sql;
+EXECUTE guard_stmt;
+DEALLOCATE PREPARE guard_stmt;
+
+UPDATE website_navigation
+SET wntcode = 10010,
+    wnscode = 10030,
+    wnjtcode = 10010,
+    wnlscode = 10010,
+    photo_size_width = 160,
+    photo_size_height = 90,
+    dcode = 61
+WHERE navigationid = @news2026_media_nav_id;
+
+SELECT
+  @news2026_site_id AS news2026_site_id,
+  navigationid,
+  name,
+  idcard,
+  url,
+  wnlscode,
+  photo_size_width,
+  photo_size_height
+FROM website_navigation
+WHERE navigationid = @news2026_media_nav_id;
+
+COMMIT;