Browse Source

商品促销活动优化

chao 4 years ago
parent
commit
8eb8558826

+ 5 - 15
src/main/resources/static/css/base/base.h5.css

@@ -138,6 +138,9 @@
 .productItem .item .btn{height:9vw;line-height:9vw}
 .productItem .item .btn{display:inline-block;width:35.8vw;height:9vw;text-align:center;overflow:hidden;color:#F94B4B;background:#FEF6F3;border-radius:2px}
 .productItem .item .btn.add{background:#FEF6F3;color:#E15616;}
+.price .login-btn{width:14vw;height:5vw;background:#FBEDE6;text-align:center;line-height:5vw;font-size:3vw;color:#e15616;padding:0.5vw 1.25vw}
+.price .pricebox{background:#e15616;width:42.5vw;height:10.5vw;line-height:5vw;display:block;font-size:3vw}
+.productItem .price em{font-weight:bold}
 .noMore{height:10vw;line-height:10vw;text-align:center;color:#ccc}
 /* 登录弹框 */
 .loginAlert{padding-top:1vw;text-align:center;}
@@ -171,26 +174,13 @@
 .priceTag .ladder .t{color:#627386}
 .priceTag .ladder .p{color:#f94b4b}
 .priceTag .close{display:block;width:46vw;height:10vw;line-height:10vw;text-align:center;background-color:#ffe6dc;border-radius:2px;border:1px solid #e15616;margin:6vw auto 0}
-
 .priceTag .promotion>div{display:block;box-sizing:border-box;width:82vw;padding:3.3vw;background:#FFF;border-radius:1.6vw;position:relative;top:50%;margin:-60vw auto 0 auto;line-height:8vw;font-size:3.7vw}
 .priceTag .promotion p{text-align:left}
 .priceTag .promotion p>em{color:#E15616;font-style:normal}
 .priceTag .promotion .p{display:block;height:12vw;padding:1vw 0 1vw 12vw;position:relative;line-height:5vw}
-.priceTag .promotion .p img{width:10vw;position:absolute;left:0;top:1vw}
+.priceTag .promotion .p img{width:10vw;height:10vw;position:absolute;left:0;top:1vw}
 .priceTag .promotion .p span{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
 .priceTag .promotion .more{color:#f55c5c;text-decoration:underline;float:right;}
 
-
-
-
-
-
-.login-btn{width:14vw;height:5vw;background:#FBEDE6;text-align:center;line-height:5vw;font-size:3vw;color:#e15616;padding:0.5vw 1.25vw}
-.activity{text-align:center;display:inline-block;height:6vw;border:0.25vw solid rgba(225,86,22,0.30196078431372547);opacity:1;border-radius:.2vw;font-size:3vw;font-family:Microsoft YaHei;font-weight:400;line-height:6vw;color:rgba(225,86,22,1) !important;position:relative;z-index:1;cursor:pointer;background:#fff;padding:0px 5vw 0 1.25vw}
-.activity .icon{width:3.7vw;height:3.7vw;position:absolute;top:2.5vw;background:transparent url(/img/base/tubiao@2x.png) no-repeat no-repeat scroll right 1.25vw center;background-position:-168px -48px;right:0}
-.activity .activeicon{background-position:-207px -46px;top:8px}
-.activityBox{border:.25vw solid rgba(225,86,22,0.30196078431372547);border-radius:0px 2px 2px 2px;position:absolute;background:#fff;left:0;font-size:3vw;text-align:center;top:7vw;padding:2vw;max-height:31.9vw;overflow:auto}
-.activeBtn{width:57px;height:24px;background:#E15616;color:#fff;border-radius:2px;float:right;margin-top:10px;cursor:pointer}
 .btnBox a{color:#fff;font-size:3vw;text-align:center}
-.pricebox{background:#e15616;width:42.5vw;height:10.5vw;line-height:5vw;display:block;font-size:3vw}
-.productItem .price em{font-weight:bold}
+

+ 7 - 17
src/main/resources/static/css/base/base.pc.css

@@ -228,6 +228,10 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .productItem .btn{display:block;width:158px;margin:12px auto;height:42px;line-height:42px;text-align:center;overflow:hidden;color:#F94B4B;background:#FFE6DC;border:1px solid #E15616;border-radius:2px}
 .productItem .btn.add{color:#E15616;}
 .productItem .btn:hover{background:#E15616;color:#FFF}
+.price .login-btn{float:right;margin:10px 10px 0 0;padding:2px 5px;border:1px solid rgba(225,86,22,0.16862745098039217);color:#E15616;border-radius:2px;height:24px;line-height:24px}
+.price .pricebox{background:#e15616;width:244px;height:44px;line-height:44px;display:block;text-align:center;margin:12px auto}
+.priceicon{font-weight:bold}
+
 /*分页*/
 .pageWrap{width:1184px;text-align:center;margin:20px auto 36px}
 .pageWrap a{box-sizing:border-box;display:inline-block;width:40px;height:40px;line-height:40px;border:1px solid #EBECEF;font-size:16px;margin:0 5px;color:#2D3036;background:#fff;border-radius:2px}
@@ -265,32 +269,18 @@ header{box-shadow: 0 2px 10px #ebecef;}
 .priceTag .tag:before{width:24px;height:24px;background-position:-88px 3px;position:absolute;right:0;top:0}
 .priceTag .tag.on:before{background-position:-117px 3px}
 .priceTag .ladder,.priceTag .promotion{position:absolute;background:#fff;box-shadow:0 3px 6px 0 #d7dfec;border-radius:2px;line-height:42px;left:0;top:28px;z-index:9;transition:all .8s;display:none}
-.priceTag .ladder>span{padding:0 20px 20px;}
+.priceTag .ladder>span{padding:0 20px 10px;text-align:center;font-size:16px;display:block;}
 .priceTag .ladder em{white-space:nowrap}
 .priceTag .ladder i{font-style:normal;display:inline-block;width:120px;text-align:center}
 .priceTag .ladder .t{color:#627386}
 .priceTag .ladder .p{color:#f94b4b}
-.priceTag .close{background:#E15616;color:#fff;border-radius:2px;cursor:pointer;display:inline-block;padding:0 20px;height:30px;line-height:30px}
+.priceTag .close{background:#E15616;color:#fff;border-radius:2px;cursor:pointer;display:inline-block;padding:0 20px;height:30px;line-height:30px;font-style:normal;}
 .priceTag .promotion{font-size:14px;line-height:30px;padding:8px 15px;width:320px;}
 .priceTag .promotion p{text-align:left}
 .priceTag .promotion p>em{color:#E15616;font-style:normal}
 .priceTag .promotion .p{display:block;height:40px;padding:10px 0 10px 50px;position:relative;line-height:20px}
-.priceTag .promotion .p img{width:40px;position:absolute;left:0;top:10px}
+.priceTag .promotion .p img{width:40px;height:40px;position:absolute;left:0;top:10px}
 .priceTag .promotion .p span{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
 .priceTag .promotion p.r{text-align:right;}
 .priceTag .promotion .more{color:#f55c5c;text-decoration:underline;float:right;}
 
-
-
-
-
-
-.login-btn{float:right;margin:10px 10px 0 0;padding:2px 5px;border:1px solid rgba(225,86,22,0.16862745098039217);color:#E15616;border-radius:2px;height:24px;line-height:24px}
-.pricebox{background:#e15616;width:244px;height:44px;line-height:44px;display:block;text-align:center;margin:12px auto}
-.activity{text-align:center;display:inline-block;height:24px;border:1px solid rgba(225,86,22,0.30196078431372547);opacity:1;border-radius:2px;font-size:12px;font-family:Microsoft YaHei;font-weight:400;line-height:24px;color:rgba(225,86,22,1) !important;position:relative;z-index:1;cursor:pointer;background:#fff;padding:0px 20px 0 5px;margin-left:15px}
-.activitystyle{border-bottom:1px solid #fff !important}
-.activity .icon.shaky:before{width:20px;height:20px;position:absolute;top:-5px;right:0;background-position:-90px 6px}
-.activity .activeicon{background-position:-207px -46px;top:8px}
-.activityBox{border:1px solid rgba(225,86,22,0.30196078431372547);border-radius:0px 2px 2px 2px;position:absolute;background:#fff;left:0;font-size:12px;text-align:center;top:28px;line-height:40px;padding:10px;max-height:319px;overflow:auto}
-.activeBtn{width:57px;height:24px;background:#E15616;color:#fff;border-radius:2px;float:right;margin-top:10px;cursor:pointer}
-.priceicon{font-weight:bold}

+ 5 - 3
src/main/resources/static/css/product/detail.h5.css

@@ -14,10 +14,12 @@ li{list-style:none}
 .productBox .detailBox .tags span{display:inline-block;height:4.2vw;line-height:4.2vw;padding:0 1vw;font-size:2.6vw;color:#FFF;background:#86B2FF;border-radius:2px;margin-right:2.7vw}
 .productBox .detailBox .detail{box-sizing:border-box;padding:2.8vw;font-size:3.4vw;line-height:7.5vw;color:#93979F;background:#f3f7fe;border-radius:2px;position:relative;margin:3.5vw 0}
 .productBox .detailBox .detail hr{border:none;border-top:1px dashed #BEC2C9;margin:2vw 0}
+.productBox .detailBox .row{position:relative;}
+.priceTag {position: absolute;left: 20vw;}
 .productBox .detailBox .row>i{font-style:normal;margin-right:2vw}
-.productBox .detailBox .row em{font-style:normal;color:#4A4F58}
-.productBox .detailBox .row em.ser{color:#93979F;display:inline-block;margin-right:4vw}
-.productBox .detailBox .row em.ser:before{content:'\2713';display:inline-block;width:3.4vw;height:3.4vw;text-align:center;line-height:3.4vw;font-size:3.4vw;background:#E15616;border-radius:1.7vw;color:#FFF;margin-right:1.4vw}
+.productBox .detailBox .row>em{font-style:normal;color:#4A4F58}
+.productBox .detailBox .row>em.ser{color:#93979F;display:inline-block;margin-right:4vw}
+.productBox .detailBox .row>em.ser:before{content:'\2713';display:inline-block;width:3.4vw;height:3.4vw;text-align:center;line-height:3.4vw;font-size:3.4vw;background:#E15616;border-radius:1.7vw;color:#FFF;margin-right:1.4vw}
 .productBox .detailBox .price{height:21vw}
 .productBox .detailBox .price .icon{display:inline-block;font-size:0;height:5vw;line-height:5vw;vertical-align:text-bottom;}
 .productBox .detailBox .price .icon:before{width:11vw;height:5vw;}

+ 5 - 4
src/main/resources/static/css/product/detail.pc.css

@@ -25,13 +25,13 @@ li{list-style:none;}
 .productBox .detailBox .tags span{display:inline-block;line-height:16px;padding: 3px 6px;font-size:12px;color: #999999;border-radius:2px;margin-right:10px;border: 1px solid #EDEDED;}
 .productBox .detailBox .detail{box-sizing:border-box;padding:14px 20px;font-size:14px;color:#93979f;background:#f3f7fe;border-radius:2px;margin:10px 0;position:relative;}
 .productBox .detailBox .detail hr{border:none;border-top:1px dashed #F9DDD0;margin:12px 0}
-.productBox .detailBox .row{padding:3px 0 3px 80px;line-height:24px}
+.productBox .detailBox .row{padding:3px 0 3px 80px;line-height:24px;position:relative;}
 .productBox .detailBox .row .l{display:inline-block;min-width:60px;height:24px;text-align:justify;vertical-align:top;margin-left:-80px;}
 .productBox .detailBox .row .l:after{content:'';display:inline-block;width:100%}
 .productBox .detailBox .row>i{font-style:normal;}
-.productBox .detailBox .row em{font-style:normal;color:#333333;margin-left: 15px}
-.productBox .detailBox .row em.ser{color:#93979F;display:inline-block;margin-right:20px;}
-.productBox .detailBox .row em.ser:before{width:20px;height:20px;margin-right:5px;background-position:-60px 0;vertical-align:text-top;}
+.productBox .detailBox .row>em{font-style:normal;color:#333333;margin-left: 15px}
+.productBox .detailBox .row>em.ser{color:#93979F;display:inline-block;margin-right:20px;}
+.productBox .detailBox .row>em.ser:before{width:20px;height:20px;margin-right:5px;background-position:-60px 0;vertical-align:text-top;}
 .productBox .detailBox .price{height:24px}
 .productBox .detailBox .price .rmb{font-weight:bold;}
 .productBox .detailBox .price .icon{display:inline-block;font-size:0;height:24px;line-height:24px;vertical-align:text-top;}
@@ -42,6 +42,7 @@ li{list-style:none;}
 .productBox .detailBox .price .icon.i3:before{background-position:-295px -208px}
 .productBox .detailBox .price .icon.i4:before{background-position:-295px -242px}
 .productBox .detailBox .price .icon.i5:before{background-position:-295px -276px}
+.productBox .detailBox .priceTag {position:absolute;top:0;left:88px;}
 .productBox .detailBox .number{display:inline-block;width:96px;line-height:24px;height:24px;box-sizing:border-box;border:1px solid #FFE6DC;border-radius:2px;font-size:0;white-space:nowrap;text-align:center;overflow:hidden;vertical-align:top;}
 .productBox .detailBox .number>em{display:inline-block;width:24px;height:22px;background:#FFE6DC;font-size:20px;line-height:20px;vertical-align:top;cursor:pointer;margin: 0}
 .productBox .detailBox .number input{width:48px;border:none;line-height:22px;font-size:14px;vertical-align:top;text-align:center;color:#E15616;}

+ 29 - 35
src/main/resources/static/js/product/detail.js

@@ -23,8 +23,7 @@ var productDetail = new Vue({
         buyRetailPrice:0,
         allTotalPrice:0,
         typedata:0,
-        promotionsId:0,//活动商品id
-        giftData:[],//赠品
+        promotionsId:0,//活动id
         isQuantity:false,
         isStock:false,
         cartAlert:false
@@ -65,11 +64,11 @@ var productDetail = new Vue({
                 }
             });
         },
-    toLogin:function() {
-    location.href ='/login.html';
-   },
+        toLogin:function() {
+            location.href ='/login.html';
+        },
         productDetail:function(){
-         var _self = this;
+            var _self = this;
             if(_self.productId ===0){return;}
             $.getJSON(spiServer + "/product/detail/price",{
                 // userId:this.userId,
@@ -93,21 +92,35 @@ var productDetail = new Vue({
                     if(_self.deailData.actStatus==1){
                     _self.promotions =  _self.deailData.promotions;
                     _self.promotionsId = _self.deailData.promotions.id;
-                     _self.promotionsProduct();
                     }
 
                 }
             });
         },
+        toggleThisLadder: function(event){
+            var el = event.currentTarget;
+            if($(el).hasClass("on")){
+                $(el).removeClass("on").siblings('.mFixed').hide();
+                if(!isPC){looseBody();}
+            }else{
+                $(el).addClass("on").siblings('.mFixed').show();
+                if(!isPC){fixedBody();}
+            }
+        },
+        hideThisLadder: function(event){
+            var el = event.currentTarget;
+            $(el).parents('.priceTag').find('.tag').removeClass("on").siblings('.mFixed').hide();
+            if(!isPC){looseBody();}
+        },
         changeCountAdd:function () { //数量增加按钮
-        var _this = this;
+            var _this = this;
             if(_this.buyRetailPriceStep == 2){
-					_this.number += _this.minBuyNumber
-				}else{
-					_this.number++
-				}
-				_this.allTotalPrice = _this.number * _this.deailData.price;
-				_this.calculatPerice()
+                _this.number += _this.minBuyNumber
+            }else{
+                _this.number++
+            }
+            _this.allTotalPrice = _this.number * _this.deailData.price;
+            _this.calculatPerice()
         },
         changeCountSub:function(){//popup弹窗数量减按钮
            var _this = this;
@@ -263,28 +276,9 @@ var productDetail = new Vue({
                     _self.parameters = r.data;
                 }
             });
-        },
+        }
+
 
-        promotionsProduct:function () {//赠品接口
-            var _self = this;
-            if(_self.promotionsId ===0){return;}
-            $.getJSON(spiServer + "/product/promotions/gifts",{
-                promotionsId: _self.promotionsId
-            }).done(function (r) {
-                if (r.code === 0 && r.data) {
-                    console.log(r)
-                    _self.giftData = r.data;
-                }
-            });
-        },
-         activity:function () {
-           var _this = this;
-           _this.isShow = !_this.isShow;
-        },
-    activeBtn:function () {
-           var _this = this;
-            _this.isShow = false;
-        },
     },
     created: function () {
         this.productId = $("#productId").val();

+ 70 - 153
src/main/resources/templates/product/detail.html

@@ -49,7 +49,7 @@
                     <span th:each="tag: *{tagList}" th:text="${tag}"></span>
                 </p>
                 <div class="detail">
-                    <p class="row"><span class="l">采美价</span><i>:</i>
+                    <div class="row"><span class="l">采美价</span><i>:</i>
                     <template v-if="userId && userId>0">
                        <em v-if="priceFlag==1" class="pricedeail">¥价格未公开</em>
                        <template v-else>
@@ -65,173 +65,90 @@
                             <i th:class="'icon mIcon i'+*{priceGrade}"></i>
                         </em>
                     </template>
-                    </p>
+                    </div>
                     <template  v-if="priceFlag!=2  && userIdentity!=2 ">
-                        <p class="row"> <span class="l">市场价</span><i>:</i>
+                        <div class="row"> <span class="l">市场价</span><i>:</i>
                              <em class="pricedeail" :class="deailData.actStatus==1?'original-price':''">¥{{buyRetailPrice}}</em>
-                        </p>
+                        </div>
                     </template>
-                    <p class="row" style="position:relative;" v-if="deailData.actStatus==1||deailData.ladderPriceFlag==1" ><span class="l">促销</span><i>:</i>
-                      <span class="activity" @click="activity" :class="isShow?'activitystyle':''" v-if="deailData.ladderPriceFlag==1">阶梯价格<i class="icon shaky" :class="isShow?'activeicon':''"></i> </span>
-                      <span class="activity" @click="activity" :class="isShow?'activitystyle':''" v-if="deailData.actStatus==1">{{promotions.name}}:{{promotions.touchPrice.toFixed(2)}}<i class="icon shaky" :class="isShow?'activeicon':''"></i> </span>
-
-
-                    <template v-if="userId && userId>0">
-                        <!-- 已登录 会员可见   -->
-                        <template v-if="priceFlag==2 && userIdentity !=2">
-                            <div class="activityBox" v-show="isShow">
-                              <p>
-                                <a style="color: #E15616" href="javascript:0" @click="clubupgrade" class="loginWithParam">升级会员</a>,参与{{promotions.name}}促销活动
-                              </p>
-                              <button class="activeBtn" @click="activeBtn">了解</button>
-                         </div>
+                    <div class="row" v-if="deailData.actStatus==1||deailData.ladderPriceFlag==1" ><span class="l">促销</span><i>:</i>
+                        <template v-if="userId && userId>0">
+                            <!-- 阶梯价 -->
+                            <div v-if="deailData.ladderPriceFlag==1" class="priceTag">
+                                <i class="tag icon mIcon" @click="toggleThisLadder($event)">阶梯价格</i>
+                                <div class="ladder mFixed">
+                                    <span>
+                                        <em class="t"><i>价格</i><i>起订量</i></em>
+                                        <em v-for="l in ladderList">
+                                            <i class="p">¥{{toFloat(l.buyPrice)}}</i>
+                                            <i>{{l.numRange}}</i>
+                                        </em>
+                                        <em @click="hideThisLadder($event)" class="close">了解</em>
+                                    </span>
+                                </div>
+                            </div>
+                            <!-- 促销活动 -->
+                            <div v-if="deailData.actStatus==1 && promotions" class="priceTag">
+                                <i v-if="promotions.type==1 && promotions.mode==1" @click="toggleThisLadder($event)" class="tag icon mIcon" v-text="promotions.name+':¥'+toFloat(promotions.touchPrice)"></i>
+                                <i v-else class="tag icon mIcon" @click="toggleThisLadder($event)" v-text="promotions?promotions.name:''"></i>
+                                <div class="promotion mFixed">
+                                    <div>
+                                        <p class="t">
+                                            <em v-if="promotions.type==1 && promotions.mode==1">{{promotions.name+':¥'+toFloat(promotions.touchPrice)}}</em>
+                                            <em v-if="promotions.mode==2">{{promotions.name+',满 ¥'+toFloat(promotions.touchPrice)+' 减 ¥'+toFloat(promotions.reducedPrice)}}</em>
+                                            <em v-if="promotions.mode==3">{{promotions.name+',满 ¥'+toFloat(promotions.touchPrice)+' 赠送商品'}}</em>
+                                        </p>
+                                        <p>促销时间:<em v-if="promotions.status==1">不限时</em><em v-else>{{promotions.beginTime.substr(0,10)+' ~ '+promotions.endTime.substr(0,10)}}</em></p>
+                                        <p v-if="promotions.type==2" class="r"><a class="more" :href="'/product/promotions.html?id='+promotions.id">更多凑单商品>>></a></p>
+                                        <template v-if="promotions.mode==3">
+                                            <p>赠品:</p>
+                                            <p>
+                                                <span v-for="g in promotions.giftList" class="p">
+                                                    <img :src="g.image">
+                                                    <span v-text="g.name"></span>
+                                                    <span v-text="'× '+g.number"></span>
+                                                </span>
+                                            </p>
+                                        </template>
+                                        <p class="r"><a class="close" @click="hideThisLadder($event)" href="JavaScript:void(0);">了解</a></p>
+                                    </div>
+                                </div>
+                            </div>
                         </template>
+                        <!-- 登录 -->
                         <template v-else>
-                        <div class="activityBox" v-show="isShow" v-if="promotions.type==3&&promotions.mode==2">
-                            <!--  店铺满减-->
-                               <p class="Boxtext">
-                                  <a style="color: #E15616" href="javascript:0" class="loginWithParam">全店铺满减:满1000.00,减500.00</a>
-                                    </br>促销时间:不限时
-                                </p>
-                                <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                         </div>
-                         <div class="activityBox" v-show="isShow"  v-if="promotions.type==1&&promotions.mode==3">
-                               <!-- 店铺满赠 -->
-                                <p class="Boxtext">
-                                    <a style="color: #E15616" href="javascript:0" class="loginWithParam">全店铺,满1000.00,赠送商品:</a>
-                                    </br>促销时间:{{promotions.beginTime}}~{{promotions.endTime}}
-                                </p>
-                                   <div class="activepro" v-for="promotions in giftData">
-                                      <a :href="'/product-'+promotions.productId+'.html'" target="_blank">
-                                           <div class="activeimg">
-                                               <img :src="promotions.image">
-                                           </div>
-                                           <div class="activeright">
-                                               <p>{{promotions.name}}</p>
-                                               <p>x1</p>
-                                           </div>
-                                       </a>
-                                   </div>
-                              <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                        </div>
-                         <div class="activityBox" v-show="isShow"  v-if="promotions.type==1&&promotions.mode==1">
-                           <!--单品优惠 -->
-                               <p class="Boxtext">
-                                  <a style="color: #E15616" href="javascript:0" class="loginWithParam">促销时间:{{promotions.beginTime}}~{{promotions.endTime}}</a>
-                               </p>
-                               <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                         </div>
-                          <div class="activityBox" v-show="isShow" v-if="promotions.type==1&&promotions.mode==2">
-                           <!--单品满减 -->
-                               <p class="Boxtext">
-                                  <a style="color: #E15616" href="javascript:0" class="loginWithParam">购买此商品,满1000.00,减500.00</a>
-                                </br>促销时间:不限时
-                               </p>
-                               <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                         </div>
-                          <div class="activityBox" v-show="isShow"  v-if="promotions.type==1&&promotions.mode==3">
-                               <!-- 单品满赠 -->
-                                <p class="Boxtext">
-                                    <a style="color: #E15616" href="javascript:0" class="loginWithParam">购买此商品,满1000.00,赠送商品:</a>
-                                    </br>促销时间:{{promotions.beginTime}}~{{promotions.endTime}}
-                                </p>
-                                   <div class="activepro" v-for="promotions in giftData">
-                                      <a :href="'/product/detail.shtml?id='+promotions.productId" target="_blank">
-                                           <div class="activeimg">
-                                               <img :src="promotions.image">
-                                           </div>
-                                           <div class="activeright">
-                                               <p>{{promotions.name}}</p>
-                                               <p>x1</p>
-                                           </div>
-                                       </a>
-                                   </div>
-                              <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                        </div>
-                        <!--阶梯价-->
-                        <div class="item-tips activityBox" v-show="isShow"  v-if="deailData.ladderPriceFlag==1">
-                           <div class="tips-content">
-                                 <div class="tip-tr">
-                                    <div class="tip-td">起订量</div>
-                                    <div class="tip-td">价格</div>
-                                 </div>
-                           <div class="tip-ul">
-                                 <ul class="tip-ul">
-                                    <li class="tip-tr ladderPriceList"  v-for="(item,index) in ladderList">
-                                        <div class="tip-td buyNumRangeShow">{{item.numRange}}</div>
-                                        <div class="tip-td buyPrice">¥{{item.buyPrice}}</div>
-                                    </li>
-                                 </ul>
-                           </div>
-                         </div>
-                          <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                       </div>
-                       <div class="activityBox" v-show="isShow"  v-if="promotions.type==2&&promotions.mode==2">
-                               <!-- 凑单满减 -->
-                                <p class="Boxtext">
-                                    <a style="color: #E15616" href="javascript:0" class="loginWithParam">购买下列商品,满1000.00,减500.00</a>
-                                    </br>促销时间:{{promotions.beginTime}}~{{promotions.endTime}}
-                                </p>
-                              <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                        </div>
-                        <div class="activityBox" v-show="isShow"  v-if="promotions.type==2&&promotions.mode==3">
-                               <!-- 凑单满赠 -->
-                                <p class="Boxtext">
-                                    <a style="color: #E15616" href="javascript:0" class="loginWithParam">购买此商品,满1000.00</a>
-                                    </br>促销时间:{{promotions.beginTime}}~{{promotions.endTime}}
-                                </p>
-                                 <p  href="javascript:0" class="loginWithParam">赠送商品:</p>
-                                   <div class="activepro" v-for="promotions in giftData">
-                                      <a :href="'/product-'+promotions.productId+'.html'" target="_blank">
-                                           <div class="activeimg">
-                                               <img :src="promotions.image">
-                                           </div>
-                                           <div class="activeright">
-                                               <p>{{promotions.name}}</p>
-                                               <p>x1</p>
-                                           </div>
-                                       </a>
-                                   </div>
-                              <button class="activeBtn" @click="activeBtn" v-show="isShow">了解</button>
-                        </div>
-
-                       </template>
-                    </template>
-                    <template v-else>
-                        <!--   未登录      -->
-                        <div class="activityBox" v-show="isShow" v-if="deailData.ladderPriceFlag==1">
-                              <p>
-                                <a style="color: #E15616" href="javascript:0" @click="toLogin">登录</a>,享受阶梯价格优惠
-                              </p>
-                              <button class="activeBtn" @click="activeBtn">了解</button>
-                         </div>
-                        <div class="activityBox" v-show="isShow" v-else>
-                              <p>
-                                <a style="color: #E15616" href="javascript:0" @click="toLogin">登录</a>,参与{{promotions.name}}促销活动
-                              </p>
-                              <button class="activeBtn" @click="activeBtn">了解</button>
-                         </div>
-                    </template>
-                    </p>
-                    <p class="row"><span class="l">品牌</span><i>:</i><em th:text="*{brandName}"></em></p>
-                    <p class="row"><span class="l">包装规格</span><i>:</i><em th:text="*{unit}"></em></p>
-                    <p class="row"><span class="l">商品编码</span><i>:</i><em th:text="*{productCode}"></em></p>
-                    <p class="row"><span class="l">库存</span><i>:</i><em th:text="*{stock}"></em></p>
-                    <p class="row"><span class="l">起批量</span><i>:</i><em th:text="*{minBuyNumber}"></em></p>
-                    <p class="row" v-if="priceFlag== 0 && userIdentity !=2"><span class="l" >采购量</span><i>:</i>
+                            <div v-if="deailData.ladderPriceFlag==1 || deailData.actStatus==1" class="priceTag">
+                                <i v-if="deailData.ladderPriceFlag==1" class="tag icon mIcon" @click="toggleThisLadder($event)">阶梯价格</i>
+                                <i v-if="deailData.actStatus==1" class="tag icon mIcon" @click="toggleThisLadder($event)" v-text="promotions?promotions.name:''"></i>
+                                <div class="promotion mFixed">
+                                    <div>
+                                        <p v-if="deailData.ladderPriceFlag==1"><em @click="toLogin">登录</em>,享受阶梯价格优惠</p>
+                                        <p v-if="deailData.actStatus==1"><em @click="toLogin">登录</em>,参与促销活动</p>
+                                        <p class="r"><a class="close" @click="hideThisLadder($event)" href="JavaScript:void(0);">了解</a></p>
+                                    </div>
+                                </div>
+                            </div>
+                        </template>
+                    </div>
+                    <div class="row"><span class="l">品牌</span><i>:</i><em th:text="*{brandName}"></em></div>
+                    <div class="row"><span class="l">包装规格</span><i>:</i><em th:text="*{unit}"></em></div>
+                    <div class="row"><span class="l">商品编码</span><i>:</i><em th:text="*{productCode}"></em></div>
+                    <div class="row"><span class="l">库存</span><i>:</i><em th:text="*{stock}"></em></div>
+                    <div class="row"><span class="l">起批量</span><i>:</i><em th:text="*{minBuyNumber}"></em></div>
+                    <div class="row" v-if="priceFlag== 0 && userIdentity !=2"><span class="l" >采购量</span><i>:</i>
                         <span class="number">
                             <em class="sub" @click="changeCountSub" :class="[isQuantity==true?'disabled':'']">-</em>
                             <input type="number" v-model="number" maxlength='6' @blur="changeNumber($event)" >
                             <em class="add" @click="changeCountAdd" :class="[isStock==true?'disabled':'']">+</em>
                         </span>
                         <input type="hidden" th:value="*{step}">
-                    </p>
+                    </div>
                     <hr>
-                    <p class="row"><span class="l">服务</span><i>:</i>
+                    <div class="row"><span class="l">服务</span><i>:</i>
                         <em class="ser icon mIcon">无忧退货</em>
                         <em class="ser icon mIcon">快速退款</em>
                         <em class="ser icon mIcon">正品保证</em>
-                    </p>
+                    </div>
                 </div>
                <template v-if="userId && userId>0">
                <div  class="btnBox" v-if="priceFlag==2 && userIdentity!=2">

+ 4 - 4
src/main/resources/templates/shopping/cart.html

@@ -77,12 +77,12 @@
                             </template>
                             <!-- 促销活动 -->
                             <div v-if="cart.actStatus==1 && cart.promotions" class="priceTag">
-                                <i v-if="cart.promotions.type==1 && cart.promotions.mode==1" @click="toggleThisLadder($event)" class="tag icon mIcon" v-text="cart.promotions.name+':¥'+toFloat(cart.price)"></i>
+                                <i v-if="cart.promotions.type==1 && cart.promotions.mode==1" @click="toggleThisLadder($event)" class="tag icon mIcon" v-text="cart.promotions.name+':¥'+toFloat(cart.promotions.touchPrice)"></i>
                                 <i v-else class="tag icon mIcon" @click="toggleThisLadder($event)" v-text="cart.promotions?cart.promotions.name:''"></i>
                                 <div class="promotion mFixed">
                                     <div>
                                         <p class="t">
-                                            <em v-if="cart.promotions.type==1 && cart.promotions.mode==1">{{cart.promotions.name+':¥'+toFloat(cart.price)}}</em>
+                                            <em v-if="cart.promotions.type==1 && cart.promotions.mode==1">{{cart.promotions.name+':¥'+toFloat(cart.promotions.touchPrice)}}</em>
                                             <em v-if="cart.promotions.mode==2">{{cart.promotions.name+',满 ¥'+toFloat(cart.promotions.touchPrice)+' 减 ¥'+toFloat(cart.promotions.reducedPrice)}}</em>
                                             <em v-if="cart.promotions.mode==3">{{cart.promotions.name+',满 ¥'+toFloat(cart.promotions.touchPrice)+' 赠送商品'}}</em>
                                         </p>
@@ -91,11 +91,11 @@
                                         <template v-if="cart.promotions.mode==3">
                                             <p>赠品:</p>
                                             <p>
-                                                <a v-for="g in cart.promotions.giftList" class="p" href="JavaScript:void(0);">
+                                                <span v-for="g in cart.promotions.giftList" class="p">
                                                     <img :src="g.image">
                                                     <span v-text="g.name"></span>
                                                     <span v-text="'× '+g.number"></span>
-                                                </a>
+                                                </span>
                                             </p>
                                         </template>
                                         <p class="r"><a class="close" @click="hideThisLadder($event)" href="JavaScript:void(0);">了解</a></p>