xiebaomin 1 year ago
parent
commit
ac5ad9f507

+ 1 - 0
src/main/java/com/caimei/www/controller/unlimited/ArticleController.java

@@ -79,6 +79,7 @@ public class ArticleController extends BaseController {
         model.addAttribute("pageNum", pageNum);
         model.addAttribute("isSearch", true);
         model.addAttribute("isSelectInfo", true);
+        System.out.println("articleImages" + CmBrandLandingVO.setValues(cmBrandLandingList));
         //model.addAttribute("pagePath", String.format("/info/center-%s-1.html", id));
         return ARTICLE_LIST_PATH;
     }

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

@@ -423,6 +423,7 @@ dl,dd,dt{zoom:1}
 	.info-banner .sider-banner {width: 37.8vw;box-sizing: border-box;display: flex;flex-direction: column;}
 	.info-banner .sider-banner .sider-banner-1, .info-banner .sider-banner .sider-banner-2{width: 100%;height: 19vw;}
 	.info-banner .sider-banner .sider-banner-2 {margin-top: 1.6vw;}
+	.info-banner img {width: 100%;height:100%;object-fit: cover}
 	.info-h5-notice {height: 10vw;box-sizing: border-box;margin: 1.6vw auto 3.2vw auto;width: 93.6vw;background: #fff;display: flex;justify-content: space-between;padding: 2.7vw 3.2vw;}
 	.info-h5-notice .h5-notice {font-weight: bold;font-size: 3.6vw;color: #333333;}
 	.info-h5-notice .h5-notice-title ul > li {list-style: disc;white-space: nowrap;text-overflow: ellipsis;width: 60vw;overflow: hidden;font-size: 3.2vw;}

+ 18 - 32
src/main/resources/templates/article/list.html

@@ -24,49 +24,35 @@
         </span>
     </div>
 </div>
-
-<!--<template th:replace="article/components/article-swiper"></template>-->
-<!--    <div class="banner" th:each="type: ${articleImages}" th:if="${type.levelType} == 1 and ${type.headAppBanner}" >-->
-<!--        <a th:href="${type.jumpLink}" th:if="${type.jumpStatus} == 2">-->
-<!--            <img th:src="${type.headAppBanner}" style="width: 100%;height: 100%;" />-->
-<!--        </a>-->
-<!--        <img th:src="${type.headAppBanner}" style="width: 100%;height: 100%;" th:if="${type.jumpStatus} == 0"/>-->
-<!--    </div>-->
-<!--    <div class="sider-banner">-->
-<!--        <div th:each="type: ${articleImages}" th:if="${type.levelType} == 2 and ${type.headAppBanner}" >-->
-<!--            <a th:href="${type.jumpLink}" th:if="${type.jumpStatus} == 2">-->
-<!--                <img th:src="${type.headAppBanner}" style="width: 100%;height: 100%;" />-->
-<!--            </a>-->
-<!--            <img th:src="${type.headAppBanner}" style="width: 100%;height: 100%;" th:if="${type.jumpStatus} == 0"/>-->
-<!--        </div>-->
-<!--    </div>-->
-<!--</div>-->
 <!--主体内容-->
 <div class="content clearfix" id="ArticleContent" v-cloak>
     <div class="info-banner AppBanner" th:if="${isSearch} and ${articleImages}">
         <div class="banner">
             <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
-                <van-swipe-item>1</van-swipe-item>
-                <van-swipe-item>2</van-swipe-item>
-                <van-swipe-item>3</van-swipe-item>
-                <van-swipe-item>4</van-swipe-item>
+                <van-swipe-item th:each="type: ${articleImages}" th:if="${type.levelType} == 1 and ${type.headAppBanner} and ${type.appStatus} == 1">
+                    <a target="_blank" th:href="${type.jumpLink}">
+                        <img th:src="${type.headAppBanner}" />
+                    </a>
+                </van-swipe-item>
             </van-swipe>
         </div>
         <div class="sider-banner">
             <div class="sider-banner-1">
                 <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
-                    <van-swipe-item>1</van-swipe-item>
-                    <van-swipe-item>2</van-swipe-item>
-                    <van-swipe-item>3</van-swipe-item>
-                    <van-swipe-item>4</van-swipe-item>
+                    <van-swipe-item th:each="type: ${articleImages}" th:if="${type.levelType} == 2 and ${type.headAppBanner} and ${type.appStatus} == 1">
+                        <a target="_blank" th:href="${type.jumpLink}">
+                            <img th:src="${type.headAppBanner}" />
+                        </a>
+                    </van-swipe-item>
                 </van-swipe>
             </div>
             <div class="sider-banner-2">
                 <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
-                    <van-swipe-item>1</van-swipe-item>
-                    <van-swipe-item>2</van-swipe-item>
-                    <van-swipe-item>3</van-swipe-item>
-                    <van-swipe-item>4</van-swipe-item>
+                    <van-swipe-item th:each="type: ${articleImages}" th:if="${type.levelType} == 3 and ${type.headAppBanner} and ${type.appStatus} == 1">
+                        <a target="_blank" th:href="${type.jumpLink}">
+                            <img th:src="${type.headAppBanner}" />
+                        </a>
+                    </van-swipe-item>
                 </van-swipe>
             </div>
         </div>
@@ -87,9 +73,9 @@
             <div class="info-banner PcBanner" th:if="${isSearch} and ${articleImages}">
                 <div class="banner">
                     <el-carousel :autoplay="true" show-indicators="false">
-                        <el-carousel-item v-for="(item, index) in 5" :key="index">
-                            <a target="_blank">
-                                {{item}}
+                        <el-carousel-item th:each="type: ${articleImages}" th:if="${type.levelType} == 1 and ${type.headPcBanner} and ${type.appStatus} == 1">
+                            <a target="_blank" th:href="${type.jumpLink}">
+                                <img th:src="${type.headPcBanner}" />
                             </a>
                         </el-carousel-item>
                     </el-carousel>