From 530e2ca961e0afcfe9e7c990f32be4fb9ecc4289 Mon Sep 17 00:00:00 2001 From: Lee <342694918@qq.com> Date: Fri, 4 Nov 2022 17:26:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=B2=9C=E6=9E=9C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/web/css/style.css | 13 +++++++---- public/static/web/js/script.js | 41 ++++++++++++++++++++++++++++----- view/public/news_second.html | 2 +- 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/public/static/web/css/style.css b/public/static/web/css/style.css index 23fb9f7..bd6a379 100644 --- a/public/static/web/css/style.css +++ b/public/static/web/css/style.css @@ -3502,6 +3502,7 @@ height: .1rem; background-image: url(/static/web/images/icon/icon-foot-arrow.png); background-size: 100%; + filter: grayscale(100%); } .management-team-nav>span.active { @@ -3517,6 +3518,7 @@ background-image: url(/static/web/images/icon/icon-foot-arrow.png); background-size: 100%; transform: rotateZ(180deg); + filter: grayscale(0); } .management-team-item { @@ -3993,6 +3995,7 @@ background-color: #ffffff; color: #333333; margin-right: 0; + border-bottom: 1px solid #f5f5f5; } .news-nav>a::after { content: ""; @@ -4001,6 +4004,7 @@ height: .1rem; background-image: url(/static/web/images/icon/icon-foot-arrow.png); background-size: 100%; + filter: grayscale(100%); } .news-nav>a.active { @@ -4016,16 +4020,17 @@ background-image: url(/static/web/images/icon/icon-foot-arrow.png); background-size: 100%; transform: rotateZ(180deg); + filter: grayscale(0); } .news-first-bg { - padding-bottom: .1rem; + padding-bottom: .2rem; } .news-first { flex-wrap: wrap; - padding: 0 0 .3rem; - background-color: #ffffff !important; + padding: .2rem; + background-color: #f5f5f5 !important; } .news-first .img { @@ -4071,7 +4076,7 @@ } .news-list { - padding-top: 0; + padding: 0 .24rem; margin-top: -.12rem !important; } diff --git a/public/static/web/js/script.js b/public/static/web/js/script.js index 68ed823..72bd1d4 100644 --- a/public/static/web/js/script.js +++ b/public/static/web/js/script.js @@ -113,13 +113,42 @@ $(function(){ // 管理团队切换 if($('.management-team-list').length){ $('.management-team-nav>span').eq(0).addClass('active'); + $('.management-team-nav>span').eq(0).show().siblings().hide(); $('.management-team-list .management-team-item').eq(0).addClass('show'); - $('.management-team-nav>span').click(function(){ - var scrollTop = $(document).scrollTop(); - if(!$(this).hasClass('active')){ - $(document).scrollTop(scrollTop+1).scrollTop(scrollTop); - $('.management-team-nav>span').eq($(this).index()).addClass("active").siblings().removeClass('active'); - $('.management-team-list .management-team-item').eq($(this).index()).addClass("show").siblings().removeClass('show'); + if(window.innerWidth <= 1024){ + $('.management-team-nav>span').click(function(){ + var scrollTop = $(document).scrollTop(); + if(!$(this).hasClass('active')){ + $(document).scrollTop(scrollTop+1).scrollTop(scrollTop); + $('.management-team-nav>span').eq($(this).index()).addClass("active").siblings().removeClass('active'); + $('.management-team-nav>span').eq($(this).index()).show().siblings().hide(); + $('.management-team-list .management-team-item').eq($(this).index()).addClass("show").siblings().removeClass('show'); + }else{ + $('.management-team-nav>span').removeClass('active'); + $('.management-team-nav>span').show(); + } + }) + }else{ + $('.management-team-nav>span').click(function(){ + var scrollTop = $(document).scrollTop(); + if(!$(this).hasClass('active')){ + $(document).scrollTop(scrollTop+1).scrollTop(scrollTop); + $('.management-team-nav>span').eq($(this).index()).addClass("active").siblings().removeClass('active'); + $('.management-team-list .management-team-item').eq($(this).index()).addClass("show").siblings().removeClass('show'); + } + }) + } + } + + // 媒体报道导航 + if(window.innerWidth <= 1024){ + $('.news-nav>a').not('.active').hide(); + $('.news-nav>a').click(function(){ + if($(this).hasClass('active')){ + $('.news-nav>a').removeClass('active'); + $('.news-nav>a').show(); + }else{ + window.location.href = $(this).data('url'); } }) } diff --git a/view/public/news_second.html b/view/public/news_second.html index ae8de8b..8b6d822 100644 --- a/view/public/news_second.html +++ b/view/public/news_second.html @@ -1,6 +1,6 @@
{foreach $childrenCate as $childrenItem} - {$childrenItem['title']} + {$childrenItem['title']} {/foreach}
\ No newline at end of file