zhengjinyi 4 gadi atpakaļ
vecāks
revīzija
5099f1e18e

+ 1 - 1
src/main/resources/static/css/base/base.pc.css

@@ -161,7 +161,7 @@ iframe{width:320px !important;height: 280px !important}
 .baseTopNav .navBox{width:500px}
 .baseTopNav .navBox ul{width:980px;}
 .baseTopNav .navBox li{float:left;position:relative}
-.baseTopNav .classifyBox{display:none;position:absolute;left:0;top:44.5px;z-index:990;min-height: 445px;padding: 0 0 20px 0;}
+.baseTopNav .classifyBox{display:none;position:absolute;left:0;top:44px;z-index:990;min-height: 445px;padding: 0 0 20px 0;}
 /* 分类 */
 .classifyBox{margin:0 auto;box-sizing:border-box;background:rgba(255,255,255,1);border-radius:0 0 2px 2px}
 .classifyBox .clsTab{height:56px;line-height:56px;white-space:nowrap;padding:0 20px;}

+ 30 - 0
src/main/resources/static/css/index/index_new.pc.css

@@ -68,6 +68,9 @@ li{list-style:none;}
     overflow: hidden;
     transition: all 0.6s;
 }
+.section_page .section_page_main.type_08{
+    height: auto;
+}
 .section_page .section_page_main.type_03{
     height: 704px;
 }
@@ -478,6 +481,33 @@ li{list-style:none;}
     background-color: #E15616;
 }
 .price_grade .bold{font-weight: bold}
+#recommendBox .swiper-pagination{
+    width:100%;
+    padding:10px 0;
+    z-index:1;
+    text-align:center;
+    font-size:0;
+}
+#recommendBox .swiper-pagination span{
+    display:inline-block;
+    width:14px;
+    height:4px;
+    border:5px solid transparent;
+    cursor:pointer;
+    opacity:.2;
+}
+#recommendBox .swiper-pagination span:before{
+    content:"";
+    display:inline-block;
+    width:100%;
+    height:4px;
+    background:#E15616;
+    border-radius:2px;
+}
+#recommendBox .swiper-pagination span.on{
+    width:28px;
+    opacity:1;
+}
 footer{
     width: 100%;
     height: auto;

+ 47 - 12
src/main/resources/static/js/index.js

@@ -12,6 +12,7 @@ var homeData = new Vue({
         infoList:[],//右侧文章模块
         pageList:[],//左侧楼层
         supplierImage:'',//供应商banner
+        supplierWwwLink:'',//供应商banner 链接
         supplierList:[],//供应商列表
         topMenuList:[]
     },
@@ -62,7 +63,7 @@ var homeData = new Vue({
             setTimeout(function(){
                 if (isPC) {
                     $('#swiper-container').slide({
-                        mainCell:".swiper-wrapper"
+                        mainCell:".swiper-wrapper-floor"
                         ,titCell:".swiper-pagination span"
                         ,effect: "leftLoop"
                         ,prevCell:".swiper-button-prev"
@@ -99,11 +100,13 @@ var homeData = new Vue({
                     _self.pageList = data.homePageFloor;
                     _self.liveList = data.liveList;
                     _self.supplierList = data.supplierImage.qualitySupplierList;
-                    _self.supplierImage = data.supplierImage.crmImage;
+                    _self.supplierImage = data.supplierImage.wwwImage;
+                    _self.supplierWwwLink = data.supplierImage.wwwLink;
                     _self.listLoading =false;
                     setTimeout(function() {
                         // 设置侧边导航数据
                         _self.SetAsideNav();
+                        _self.SwiperNanner();
                     },500);
                 }else{
                     CAIMEI.Alert(response.msg, '确定');
@@ -164,6 +167,40 @@ var homeData = new Vue({
                 })
             }
         },
+        SwiperNanner: function(){
+            setTimeout(function(){
+                // 图片懒加载
+                $("img[data-original]").lazyload();
+            },500);
+            setTimeout(function(){
+                if (isPC) {
+                    $('#recommendBox').slide({
+                        mainCell:".swiper-wrapper"
+                        ,titCell:".swiper-pagination span"
+                        ,effect: "leftLoop"
+                        ,interTime: 3000
+                        ,autoPlay: true
+                        ,scroll:5
+                        ,vis:5
+                    });
+                } else {
+                    var swiper = new Swiper('#recommendBox', {
+                        slidesPerView: 2,
+                        slidesPerColumn: 2,
+                        spaceBetween: 0,
+                        slidesPerGroup: 2,
+                        autoplay: {
+                            delay: 3000,
+                            disableOnInteraction: false
+                        },
+                        pagination: {
+                            el: '.swiper-pagination'
+                        }
+                    });
+
+                }
+            },500);
+        },
         showSubNav: function(event){
             var el = event.currentTarget;
             var parent = $(el).parent();
@@ -201,7 +238,7 @@ var homeData = new Vue({
                 return false;
             }
             var scoll = Math.max($('html').scrollTop(), $('body').scrollTop());
-            if(scoll >200){
+            if(scoll >450){
                 $('#sideNav').show();
                 if(isPC){
                     $('#advertising').show();
@@ -229,15 +266,13 @@ var homeData = new Vue({
             }
         });
         // 侧边导航
-        $('#sideNav .item-a').each(function(){
-            alert($(this).text())
-        });
-        $('#sideNav .item-a').on("click", '.item-a',function () {
-            var id = $(this).attr('data-id');
-            console.log(id);
-            var floorScroll = $('.section_page_title [data-id='+id+']').offset().top;
-            $('html,body').animate({scrollTop: floorScroll},600);
-        });
+        setTimeout(function(){
+            $('#sideNav').on("click", 'a[data-id]',function () {
+                var id = $(this).attr('data-id');
+                var floorScroll = $('.section_page_title [data-id='+id+']').offset().top;
+                $('html,body').animate({scrollTop: floorScroll},600);
+            });
+        },2000);
         //关闭广告图
         $('#advertising').on('click','.close',function () {
             $(this).parents('.item').hide();

+ 68 - 4
src/main/resources/templates/index.html

@@ -49,8 +49,8 @@
                             </div>
                             <div class="right_item_main" v-for="(live,index) in liveList">
                                 <a :href="live.link" class="item_banner" v-if="index === 0" target="_blank" :title="live.liveTitle">
-                                    <img :src="live.image ? live.image : '/img/base/placeholder.png'" alt="">
-                                    <div class="name" ></div>
+                                    <img :src="live.homePageImage ? live.homePageImage : '/img/base/placeholder.png'" alt="">
+                                    <div class="name" v-text="live.liveTitle"></div>
                                     <div class="statu">
                                         <i :class="live.liveStatus | statusTypeClass" class="mIcon"></i>
                                         <p>{{ live.liveStatus | statusType }}</p>
@@ -618,6 +618,70 @@
                                 </a>
                             </div>
                         </template>
+                        <template v-if="page.floorContent.templateType == '8'">
+                            <div class="floorCon">
+                                <div class="hotList swiper-wrapper-floor" id="recommendBox">
+                                    <div class="section_page_main type_08 clear mfw swiper-wrapper" :class="page.isPageMore ? 'max' : ''">
+                                        <a class="page_main_item swiper-slide" :href="pros.link"  v-for="(pros,index) in page.floorImageList">
+                                            <img class="page_main_image" src="/img/base/placeholder.png" :data-original="pros.image" :alt="pros.name">
+                                            <div class="page_main_tag" v-if="pros.listType == 2">{{ pros.label }}</div>
+                                            <div class="page_main_text" target="_blank">{{pros.name}}</div>
+                                            <div class="page_main_price" v-if="pros.listType == 1">
+                                                <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                                    <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
+                                                    <template v-if="pros.product.price1TextFlag==1">
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_unde">¥价格未公开</div>
+                                                    </template>
+                                                    <template v-else>
+                                                        <template v-if="(pros.product.price1TextFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">
+                                                                    {{pros.product.promotions.name}}
+                                                                    <span v-if="pros.priceFlag != 1">:¥{{pros.product.retailPrice | NumFormat}}</span>
+                                                                </p>
+                                                            </div>
+                                                            <div class="main_price_show" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                                ¥{{ (PromotionsFormat(pros.product.promotions) ? pros.product.price1 : pros.product.retailPrice ) | NumFormat  }}
+                                                            </div>
+                                                        </template>
+                                                        <template v-else-if="pros.product.price1TextFlag==2 && pros.product.userIdentity==4">
+                                                            <div class="price_text_tag">
+                                                                <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                            </div>
+                                                            <div class="main_price_unde">¥会员可见</div>
+                                                        </template>
+                                                        <template v-else>
+                                                            <em class="bold">¥<i :class="'icon mIcon i'+pros.product.price1Grade"></i></em>
+                                                            <span class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
+                                                        </template>
+                                                    </template>
+                                                </template>
+                                                <template v-else>
+                                                    <template v-if="pros.product.productCategory == 1">
+                                                        <div class="price_text_tag">
+                                                            <p class="listTag" v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                        <div class="main_price_none">
+                                                            <em class="price_grade"><span class="bold">¥</span><i :class="'icon mIcon price_grade_'+pros.product.price1Grade"></i></em>
+                                                            <p class="listTag" v-if="pros.actStatus==1">{{pros.product.promotions.name}}</p>
+                                                        </div>
+                                                    </template>
+                                                    <template v-else>
+                                                        <div class="main_price_none sec">
+                                                            <em class="price_grade"><span>¥</span>登录可见</em>
+                                                        </div>
+                                                    </template>
+                                                </template>
+                                            </div>
+                                        </a>
+                                    </div>
+                                    <div class="swiper-pagination mfc"> <span v-if="isPC" v-for="i in page.floorImageList.length/5"></span></div>
+                                </div>
+                            </div>
+                        </template>
                     </div>
                     <div class="section_page">
                         <div class="section_page_title">
@@ -625,7 +689,7 @@
                             <p>采美正品联盟 质量保证</p>
                         </div>
                         <div class="section_page_bottom">
-                            <a href="" class="page_main_li ad_01"><img class="page_main_item_adv" :src="supplierImage" alt=""> </a>
+                            <a href="supplierWwwLink" class="page_main_li ad_01"><img class="page_main_item_adv" :src="supplierImage" alt=""> </a>
                             <a :href="shop.link" class="page_main_li ad_02" v-for="(shop,index) in supplierList">
                                 <img class="page_main_logo" :src="shop.image" alt="">
                                 <div class="page_main_name">{{ shop.supplierName }}</div>
@@ -638,7 +702,7 @@
         <!--右侧边栏导航-->
         <div id="sideNav" v-if="isPC">
             <div class="item">
-                <a class="item-a" v-for="nav in asideNav" :data-id="nav.id" v-text="nav.value" href="javascript:void(0);"></a>
+                <a class="item-sideNav" href="javascript:void(0);" v-for="nav in asideNav" :data-id="nav.id" v-text="nav.value" ></a>
             </div>
         </div>
     </template>

+ 1 - 1
src/main/resources/templates/product/detail.html

@@ -40,7 +40,7 @@
             <div class="detailBox" th:object="${product}">
                 <div class="crumbs">
                     <span>所属分类:</span>
-                    <a th:href="@{'/product/list.html?category=' + *{bigTypeId} + '-0-0'}" th:text="*{bigTypeText}"></a>
+                    <a href="javascript:void(0);" th:text="*{bigTypeText}"></a>
                     <span>&gt;</span>
                     <a th:href="@{'/product/list.html?category=' + *{bigTypeId} + '-' + *{smallTypeId} + '-0'}" th:text="*{smallTypeText}"></a>
                     <span>&gt;</span>