From 0c291de182c782b0bb554d4172e4707292fc87b4 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Thu, 4 Dec 2025 14:47:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A6=82=E5=BF=B5=E4=B8=AD=E5=BF=83H5?= =?UTF-8?q?=E7=AB=AF=E5=8D=A1=E7=89=87=E5=B0=BA=E5=AF=B8=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E4=B8=80=E5=B1=8F=E5=8F=AF=E6=98=BE=E7=A4=BA=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - H5端改为两列布局,间距从6改为3 - 卡片背景高度从180px减小到100px - Logo尺寸从120px减小到60px - 内容区域padding和间距响应式调整 - 描述文字H5端显示1行 - 时间轴按钮尺寸H5端缩小 --- src/views/Concept/index.js | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/views/Concept/index.js b/src/views/Concept/index.js index cfcb9464..6432fb22 100644 --- a/src/views/Concept/index.js +++ b/src/views/Concept/index.js @@ -78,6 +78,7 @@ import { MenuList, MenuItem, Collapse, + useBreakpointValue, } from '@chakra-ui/react'; import { SearchIcon, ViewIcon, CalendarIcon, ExternalLinkIcon, StarIcon, ChevronDownIcon, InfoIcon, CloseIcon, ChevronRightIcon } from '@chakra-ui/icons'; import { FaThLarge, FaList, FaTags, FaChartLine, FaRobot, FaTable, FaHistory, FaBrain, FaLightbulb, FaRocket, FaShieldAlt, FaCalendarAlt, FaArrowUp, FaArrowDown, FaNewspaper, FaFileAlt, FaExpand, FaCompress, FaClock, FaLock } from 'react-icons/fa'; @@ -672,6 +673,10 @@ const ConceptCenter = () => { const changePercent = concept.price_info?.avg_change_pct; const changeColor = getChangeColor(changePercent); const hasChange = changePercent !== null && changePercent !== undefined; + // H5 端使用更紧凑的尺寸 + const isMobile = useBreakpointValue({ base: true, md: false }); + const coverHeight = useBreakpointValue({ base: '100px', md: '180px' }); + const logoSize = useBreakpointValue({ base: '60px', md: '120px' }); // 生成随机涨幅数字背景 const generateNumbersBackground = () => { @@ -705,7 +710,7 @@ const ConceptCenter = () => { boxShadow="0 4px 12px rgba(0, 0, 0, 0.1)" > {/* 毛玻璃涨幅数字背景 */} - + {/* 渐变背景层 */} { top="50%" left="50%" transform="translate(-50%, -50%)" - width="120px" - height="120px" + width={logoSize} + height={logoSize} opacity={0.15} > { - - + + {/* 概念名称 */} { {concept.concept} - {/* 描述信息 */} - + {/* 描述信息 - H5端显示1行 */} + {concept.description || '暂无描述信息'} {concept.stocks && concept.stocks.length > 0 && ( { > - + 热门个股 @@ -942,20 +947,20 @@ const ConceptCenter = () => { )} - + {formatAddedDate(concept)}