zhengjinyi 6 hónapja
szülő
commit
dbb12eea1a

+ 3 - 2
src/main/resources/static/css/index/index_new.h5.css

@@ -126,10 +126,11 @@
 .Popup{position:fixed;background:rgba(34,39,46,0.5);top:0;left:0;width:100%;height:100%;z-index:99999;opacity:0}
 .Popup.show{opacity:1}
 .Popup .show_popup{width:70vw;height:94.9vw;position:absolute;top:0;right:0;left:0;bottom:0;margin:auto}
+.bg_img {width:100%;height:100%}
 .bg_img img{width:100%;height:100%}
-.bg_icon{text-align:right;position:absolute;right:-5vw}
+.bg_icon{text-align:right;position:absolute;left:50%;bottom: -20vw;margin-left: -5vw;}
 .bg_icon .mIcon{width:10vw;height:10vw;display:inline-block}
-.bg_icon .mIcon:before{width:10vw;height:10vw;background-position:-33.3vw -77.3vw;cursor:pointer}
+.bg_icon .mIcon:before{width:10vw;height:10vw;background-position:-34.3vw -77.3vw;cursor:pointer}
 .section_right .section_right_item.ross img{width: 100%;height: 61.6vw;display: block;border-radius: 2vw;object-fit:cover;}
 .el-carousel__button{ width: 10px !important; }
 .el-carousel--horizontal{border-radius: 2vw;}

+ 4 - 3
src/main/resources/static/css/index/index_new.pc.css

@@ -154,7 +154,7 @@ li{list-style:none;}
 .section_coupundle .section_coupundle_inner{ width:1184px; height: 100px; margin: 0 auto;position: relative;}
 .section_coupundle .section_coupundle_close{ width:30px;height: 30px;cursor: pointer;background: url("/img/base/icon-close@2x.png") no-repeat;background-size: cover;position: absolute;right: -16px;top: -15px; }
 .section_coupundle a{ width: 1184px; height: 100px;margin: 0 auto; display: block;}
-.section_coupundle a img{ width: 1184px; height: 100px;display: block;border-radius: 4px;overflow: hidden;}
+.section_coupundle a img{ width: 1184px; height: 100px;display: block;border-radius: 8px;overflow: hidden;}
 
 /*公告*/
 #new-container{height: 48px;background: url("/img/base/icon-newbg@2x.png");background-size: cover;}
@@ -225,9 +225,10 @@ footer{width:100%;height:auto;float:left}
 .Popup{position: fixed;background: rgba(34,39,46, 0.5);top: 0;left: 0;width: 100%;height: 100%;z-index: 99999;opacity: 0;}
 .Popup.show{opacity: 1;}
 .Popup .show_popup{width: 344px;height: 472px;position: absolute;top: 0;right: 0;left: 0;bottom: 0;margin: auto;cursor: pointer}
+.bg_img {width: 100%;height: 100%;}
 .bg_img img{width: 100%;height: 100%;}
-.bg_icon{text-align: right;position: absolute;right: -50px; top: 30px;}
+.bg_icon{text-align: right;position: absolute;left: 50%;bottom: -70px;margin-left: -20px;}
 .bg_icon .icon{width: 50px;height: 50px;display: inline-block;}
-.bg_icon .icon:before{width: 50px;height: 50px;background-position: -187px -545px;cursor: pointer;}
+.bg_icon .icon:before{width: 50px;height: 50px;background-position: -187px -540px;cursor: pointer;}
 .el-carousel__button{ width: 8px !important; }
 .el-carousel--horizontal{border-radius: 8px;}

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

@@ -11,6 +11,7 @@ var homeData = new Vue({
         // infoList:[],//右侧文章模块
         newsList:[],
         popupFlag:false,
+        centerImage:{},//广告活动弹窗
         couponEntry:2,// 活动优惠券弹窗显示控制
         hotListPageFloor:[],// 新皮橱窗
         homePageFloor:[],//楼层
@@ -71,20 +72,18 @@ var homeData = new Vue({
             // 其它
             return false;
         },
-        popupPage:function(){  // 弹窗点击跳转链接
-            const _self = this;
-            this.popupFlag=false;
-            window.location.href='/user/coupon-collection.html';
+        popupPage(){  // 弹窗点击跳转链接
             localStorage.setItem('lockTime',Date.now());
             window.localStorage.setItem('isActivityStatus',true);
+            window.open(this.centerImage.link)
         },
-        closePopup:function(){  // 关闭弹窗
+        closePopup(){  // 关闭弹窗
               this.popupFlag=false;
               $('.Popup').slideUp(100);
-              localStorage.setItem('lockTime',Date.now());
-              localStorage.setItem('isActivityStatus',true);
+              // localStorage.setItem('lockTime',Date.now());
+              // localStorage.setItem('isActivityStatus',true);
         },
-        diffTime:function(time){
+        diffTime(time){
             const date = Date.now();
             console.log('缓存时间戳',time);
             console.log('当前时间戳',date);
@@ -137,11 +136,13 @@ var homeData = new Vue({
                         _self.newsList = response.data.annlist.slice(0,1)
                     }
                     _self.isCmPopup = GLOBAL_USER_ID <= 0
-                    if(GLOBAL_USER_ID === 0 && _self.couponEntry === 1){
-                        var isActivityStatus =  localStorage.getItem('isActivityStatus');
-                        //新加优惠券弹窗
+                    const centerImageList = response.data.centerImage
+                    if(centerImageList.length > 0){
+                        _self.centerImage = response.data.centerImage[0]
+                        const isActivityStatus = localStorage.getItem('isActivityStatus');
+                        //广告弹窗
                         if(isActivityStatus){
-                            var  lockTime = localStorage.getItem('lockTime');
+                            const lockTime = localStorage.getItem('lockTime');
                             _self.popupFlag = this.diffTime(lockTime);
                         }else{
                             setTimeout(function () {
@@ -149,6 +150,18 @@ var homeData = new Vue({
                             },1000);
                         }
                     }
+                    // if(GLOBAL_USER_ID === 0 && _self.couponEntry === 1){
+                    //     const isActivityStatus = localStorage.getItem('isActivityStatus');
+                    //     //新加优惠券弹窗
+                    //     if(isActivityStatus){
+                    //         const lockTime = localStorage.getItem('lockTime');
+                    //         _self.popupFlag = this.diffTime(lockTime);
+                    //     }else{
+                    //         setTimeout(function () {
+                    //             _self.popupFlag = true;
+                    //         },1000);
+                    //     }
+                    // }
                 }
             });
         },

+ 2 - 2
src/main/resources/templates/index.html

@@ -672,8 +672,8 @@
         <div class="show_popup">
             <div class="bg_icon" @click="closePopup"><i class="icon mIcon"></i></div>
             <div class="bg_img" @click="popupPage">
-                <img src="https://static.caimei365.com/app/meibohui/www/coupon-pop-pc.png" v-if="isPC">
-                <img src="https://static.caimei365.com/app/meibohui/www/coupon-pop-h5.png" v-else>
+                <img :src="centerImage.image" v-if="isPC">
+                <img :src="centerImage.crmImage" v-else>
             </div>
         </div>
     </div>