Quellcode durchsuchen

修复部分样式问题

xiebaomin vor 1 Jahr
Ursprung
Commit
e6aadf43b7

+ 2 - 0
src/main/resources/static/css/article/article.css

@@ -45,6 +45,7 @@ dl,dd,dt{zoom:1}
 	.icon:before{content:'';display:inline-block;background:url(/img/base/icon.png) no-repeat;font-size:0}
 	.header .van-overlay {display: none;}
 	.header .van-popup {display: none;}
+	.AppBanner {display: none !important;}
 	/* 阴影*/
 	/* 分享,回到顶部 */
 	#scrollTop{display:none;position:fixed;right:50%;margin-right:-700px;width:88px;z-index:9999;bottom:120px;}
@@ -355,6 +356,7 @@ dl,dd,dt{zoom:1}
 	.nav {display: none;}
 	.tip-bar {display: none;}
 	.search-top .info-logo-content {display: none;}
+	.PcBanner {display: none !important;}
 	.search-top {position: sticky;display: flex;justify-content: space-between;box-sizing: border-box;height: 13.6vw;background: #fff;padding: 0 4vw;align-items: center;}
 	.search-top .H5-info-logo {width: 28vw; height: 12vw;background: url(/img/article/h5-logo.png) center;background-size: cover;}
 	.search-top .H5-info-menu {width: 29vw; height: 100%;box-sizing: border-box;display: flex;align-items: center;justify-content: space-between; font-size: 3.2vw;}

+ 22 - 3
src/main/resources/templates/article/list.html

@@ -10,12 +10,12 @@
 <div class="cm-modal"></div>
 <!--导航栏-->
 <template th:replace="article/components/article-header"></template>
-<div class="info-banner" id="Info-Banner" th:if="${isSearch}">
-    <div class="banner" th:each="type: ${articleImages}" th:if="${type.levelType} == 1">
+<div class="info-banner PcBanner" th:if="${isSearch}">
+    <div class="banner" th:each="type: ${articleImages}" th:if="${type.levelType} == 1" th:onclick="|trumpLink(${type.jumpLink})|">
         <img th:src="${type.headPcBanner}" style="width: 100%;height: 100%;" />
     </div>
     <div class="sider-banner">
-        <div th:each="type: ${articleImages}" th:if="${type.levelType} == 2">
+        <div th:each="type: ${articleImages}" th:if="${type.levelType} == 2" th:onclick="|trumpLink(${type.jumpLink})|">
             <img th:src="${type.headPcBanner}" style="width: 100%;height: 100%;" />
         </div>
     </div>
@@ -35,6 +35,16 @@
         </div>
     </div>
 </div>
+<div class="info-banner AppBanner" th:if="${isSearch}">
+    <div class="banner" th:each="type: ${articleImages}" th:if="${type.levelType} == 1" th:onclick="|trumpLink(${type.jumpLink})|">
+        <img th:src="${type.headAppBanner}" style="width: 100%;height: 100%;" />
+    </div>
+    <div class="sider-banner">
+        <div th:each="type: ${articleImages}" th:if="${type.levelType} == 2" th:onclick="|trumpLink(${type.jumpLink})|">
+            <img th:src="${type.headAppBanner}" style="width: 100%;height: 100%;" />
+        </div>
+    </div>
+</div>
 <div class="tip-bar">
     <!--<div class="tip">提示:产品详情请到采美商城搜索</div> -->
     <!--面包屑-->
@@ -199,6 +209,15 @@
     </div>
 </div>
 
+<script type="text/javascript">
+const trumpLink = (jumpLink) => {
+    console.log(jumpLink)
+    if (jumpLink) {
+        window.location.href = jumpLink
+    }
+}
+</script>
+
 <template th:replace="article/components/article-drawer"></template>
 <template th:replace="article/components/article-footer"></template>
 <template th:replace="components/foot-link"></template>