From aa03951e71264de942e0475ac23fec6078e6fc07 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 11 Jun 2025 13:19:09 +0800 Subject: [PATCH] zhfw --- .../components/content/integ/Integrated.tsx | 175 ++++++++++-------- apps/web/components/content/jcdt/page.tsx | 2 + 2 files changed, 99 insertions(+), 78 deletions(-) diff --git a/apps/web/components/content/integ/Integrated.tsx b/apps/web/components/content/integ/Integrated.tsx index cec8bb4..e921f3e 100644 --- a/apps/web/components/content/integ/Integrated.tsx +++ b/apps/web/components/content/integ/Integrated.tsx @@ -1,8 +1,9 @@ import React from 'react'; -const services = [ +// 将服务分成三组 +const serviceGroup1 = [ { - icon: '/picture/1.jpg', // 这里可以替换为图片或SVG + icon: '/picture/1.jpg', label: '军队自考', href: '/study', }, @@ -11,26 +12,6 @@ const services = [ label: '军人', href: '/scholarship', }, - { - icon: '/picture/3.jpg', - label: '蓝天邮局', - href: '/mail', - }, - { - icon: '/picture/4.jpg', - label: '策划工具', - href: '/plan', - }, - { - icon: '/picture/5.jpg', - label: '情调研', - href: '/survey', - }, - { - icon: '/picture/6.jpg', - label: '上网助手', - href: '/net', - }, { icon: '/picture/7.jpg', label: '常用软件', @@ -41,6 +22,19 @@ const services = [ label: '智能语音', href: '/voice', }, +]; + +const serviceGroup2 = [ + { + icon: '/picture/3.jpg', + label: '蓝天邮局', + href: '/mail', + }, + { + icon: '/picture/4.jpg', + label: '策划工具', + href: '/plan', + }, { icon: '/picture/9.jpg', label: '办公模板', @@ -51,6 +45,19 @@ const services = [ label: '智能校对', href: '/ai-check', }, +]; + +const serviceGroup3 = [ + { + icon: '/picture/5.jpg', + label: '情调研', + href: '/survey', + }, + { + icon: '/picture/6.jpg', + label: '上网助手', + href: '/net', + }, { icon: '/picture/11.jpg', label: '考试平台', @@ -65,67 +72,79 @@ const services = [ const Integrated: React.FC = () => { return ( -
-
-
- - 综合服务 - + <> +
+ +
+
+
+

综合服务

- - - - -
- {services.map((service, index) => { - // 计算实际显示位置 - const row = Math.floor(index / 6); - const col = index % 6; - - // 根据行数调整列的顺序 - let displayCol = col; - // if (row === 0) { - // // 第一行:右下、左下顺序 - // displayCol = col < 3 ? col + 3 : col - 3; - // } else { - // // 第二行:右上、左上顺序 - // displayCol = col < 3 ? col + 3 : col - 3; - // } - - // 确定内容在网格中的位置 - const positionClass = row === 0 - ? (col % 2 === 0 ? 'bottom-0 right-0' : 'bottom-0 left-0') // 第一行:右下、左下 - : (col % 2 === 0 ? 'top-0 right-0' : 'top-0 left-0'); // 第二行:右上、左上 - - return ( - // 外部 div:负责网格布局和白色背景,本身不可点击 -
- {/* 这个 div 是 104x108 的容器,绝对定位在单元格内,并负责对齐其内部的可点击链接 */} -
- {/* 这个 标签是可点击的区域,它将包裹图标和标签,并作为 Flex 容器垂直排列它们 */} - - {/* 为图标创建一个圆形背景的 div */} -
- {/* 图标:应用文本颜色 */} - {service.label} + {/* 三等分flex布局 */} + + + {/* 第二组 */} +
+
+ {serviceGroup2.map((service, index) => ( +
+
+ {service.label} +
+ + {service.label} + +
+ ))} +
+
+ + {/* 第三组 */} +
+
+ {serviceGroup3.map((service, index) => ( +
+
+ {service.label} +
+ + {service.label} + +
+ ))} +
+
+
-
+ ); }; diff --git a/apps/web/components/content/jcdt/page.tsx b/apps/web/components/content/jcdt/page.tsx index 2181437..810b9cf 100644 --- a/apps/web/components/content/jcdt/page.tsx +++ b/apps/web/components/content/jcdt/page.tsx @@ -2,6 +2,7 @@ import JcdtList from './jcdtlist'; import FhjtPage from './fhjt'; import FhwsPage from './fhws'; import BqrxPage from './bqrx'; +import Integrated from '../integ/Integrated'; const JcdtContainer = () => { return ( <> @@ -27,6 +28,7 @@ const JcdtContainer = () => { +
);