ソースを参照

单品促销-优惠价活动,前端标签展示逻辑优化

yuwenjun1997 2 年 前
コミット
727971506c

+ 4 - 1
src/main/resources/static/css/activity/beautyTopic.css

@@ -29,6 +29,8 @@ a{color:#333;text-decoration:none}
 .cm-container{width:100%;margin:0 auto}
 [class*='cm-col-']{float:left;-webkit-box-sizing:border-box;box-sizing:border-box}
 .cm-floor .swiper-slide{ height: auto;}
+.cm-product-item .cm-prodcut-price .price.none{color: #999;text-decoration: line-through;}
+.cm-product-item .cm-prodcut-price .price.none .red{color: #999;}
 @media (max-width:560px){
 .cm-col-xs-1{width:1.66667%}
 .cm-col-xs-2{width:3.33333%}
@@ -664,6 +666,7 @@ a{color:#333;text-decoration:none}
 .cm-article-item .cm-line{height:1px;background-color:#f0f0f0}
 .cm-article-item .cm-line::before{content:'';display:block;height:2px;width:16px;background-color:#ff5c00}
 .cm-product-item .cm-product-title{font-size:14px;color:#4a4f58;line-height:20px;-webkit-transition:all 0.4s;-o-transition:all 0.4s;transition:all 0.4s}
+.cm-product-item .cm-prodcut-price .price-tag .tag{display:inline-block;height:20px;line-height:20px;border:1px solid #ffe6dc;border-radius:2px;font-size:12px;color:#e15616;cursor:pointer;background:#fff;padding:0 4px;position:relative;font-style:normal}
 .cm-product-item .h20{height:20px}
 .cm-product-item .h24{height:24px}
 .cm-product-item .h44{height:44px}
@@ -768,4 +771,4 @@ a{color:#333;text-decoration:none}
 .video-popup .content{width: 100%;height: 100%;position: absolute;left: 0; top: 0;}
 .video-popup .content video{width: 100%;height: 100%;display: block;}
 .video-popup .close {position: absolute;right: 3.6vw;top: 3.6vw; z-index: 1; width: 7.2vw;height: 7.2vw;background: url(/img/activity/pc_close.png);background-size: 7.2vw;cursor: pointer;}
-}
+}

+ 1 - 0
src/main/resources/static/css/product/detail.pc.css

@@ -142,6 +142,7 @@ li{list-style:none;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-h1 {width: 100%;height: 20px;line-height: 20px;font-size: 14px;color: #22272E;font-weight: bold;float: left;text-align: left;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-unit{width: 100%;height: 180px;padding: 12px 0;overflow-y: scroll;box-sizing: border-box;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-unit .unitTags{display: inline-block;height: 24px;line-height: 24px;border: 1px solid #BFC6D2;border-radius: 2px;font-size: 12px;color: #627386;background: #FFFFFF;padding: 0 8px;position: relative;font-style: normal;cursor: pointer;margin-right: 8px;margin-bottom: 11px;float: left;}
+.product-supporting-list .tr-3 .sku-popup-viw .sku-price .price_text_tag .listTag{margin: 0;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-unit .unitTags.active{border-color: #E15621;color: #E15621;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-unit .unitTags.active .tips{background: #E15616;}
 .product-supporting-list .tr-3 .sku-popup-viw .sku-unit .tips{display: block;padding: 0 4px;height: 16px;line-height: 16px;font-style: normal; font-size: 12px;text-align: center;background: #CBD2DF;border-radius: 2px;position: absolute;right: -5px;top: -8px;color: #FFFFFF;}

+ 2 - 2
src/main/resources/static/css/product/promotions.css

@@ -65,7 +65,7 @@ li{list-style:none}
     .empty{margin-top:32px;background:#fff}
     .empty p{color:#909090;font-size:14px}
 
-    .productItem .price em{font-weight: normal}
+    .productItem .price em{font-weight: normal;margin-left: 0;}
     .productItem .price em.bold{font-weight: bold}
     .productItem .price .price_text_tag{width: 100%;height: 22px;box-sizing: border-box;float: left;margin-top: 3px;}
     .productItem .price .price_text_tag .listTag{margin: 0;float: left}
@@ -162,4 +162,4 @@ li{list-style:none}
     .product-screen-btn{width: 100%;height: 11.2vw;float: left;margin-top: 4vw;}
     .product-screen-btn .sub-button{width: 64vw;height: 11.2vw;margin: 0 auto;line-height: 11.2vw;background-color: #E15621;text-align: center;font-size: 3.4ve;color: #FFFFFF;}
 
-}
+}

+ 1 - 1
src/main/resources/static/js/index.js

@@ -214,7 +214,7 @@ var homeData = new Vue({
                         slidesPerView: 5,
                         spaceBetween: 13,
                         slidesPerGroup: 5,
-                        loop: true,
+                        loop: false,
                         autoplay: {
                             delay: 4000,
                             stopOnLastSlide: false,

+ 19 - 24
src/main/resources/static/js/product/mixins/supportMixins.js

@@ -3,45 +3,40 @@ var supportMixins = function () {
     return {
         data() {
             return {
-                currentIndex:0,
-                skuIndex:0,
-                skuSupportingIndex:0,
+                showSkuPopup: false,
+                currentIndex:0, // 前选中商品索引
                 isbtnDisable:false,
-                handldSku:{},
-                handlePros:{},
-                suppPriceGrade:0
+                skuSupportingIndex:0, // 当前选中商品选中的sku的索引
+                handlePros:{}, // 当前选中商品
+                currentSku: {} // 当前选中商品选中的sku
             }
-        },
-        mounted: function() {
-
         },
         methods: {
             handleShowPopup(pros,index){
+                const slef = this
+                this.handlePros = deepClone(pros);
+                this.skuSupportingIndex = this.handlePros.skus.findIndex(function (sku){
+                    return slef.handlePros.skuId === sku.skuId
+                })
                 this.currentIndex = index;
-                this.handldSku = pros.skus[0];
-                pros.isSkuPopup = !pros.isSkuPopup;
+                this.showSkuPopup = true
             },
             handleSkuCancel(pros,index){// 取消选择Sku
-                pros.isSkuPopup = false;
+                this.currentIndex = index;
+                this.showSkuPopup = false
             },
             handleSkuConfirm(pros,index){// 确认选择Sku
                 if(this.isbtnDisable){ return; }
-                // pros.unit = this.handldSku.unit;
-                // pros.price = this.handldSku.price;
-                // pros.skuId = this.handldSku.skuId;
-                this.switchSkuRef(pros, this.handldSku.skuId)
-                pros.isSkuPopup = false;
+                this.switchSkuRef(pros, this.currentSku.skuId)
+                pros.number = this.currentSku.minBuyNumber
+                this.currentIndex = index;
+                this.showSkuPopup = false
             },
             handleSupportingChoisSku(pros,sku,index){// 配套商品选择规格
-                this.handlePros = pros;
-                this.handldSku = sku;
+                this.currentSku = sku
+                this.switchSkuRef(this.handlePros, sku.skuId)
                 this.skuSupportingIndex = index;
-                this.handlePros.price = sku.price
-                this.handlePros.originalPrice = sku.originalPrice
                 this.isbtnDisable = sku.stock === 0;
-                pros.priceGrade  = sku.priceGrade
-                pros.number  = sku.minBuyNumber
-                console.log('priceGrade',pros.priceGrade)
             },
             handleSupportingSubmit (type) {
                 var _self = this;

+ 36 - 77
src/main/resources/templates/activity/beautyTopic.html

@@ -88,6 +88,12 @@
                                                     <div class="cm-tags cm-p-t-2 cm-p-b-2 h20">
                                                         <!--                                                        <span class="cm-tag color2" v-if="pros.product.couponsLogo">优惠券</span>-->
                                                         <span class="cm-tag color3" v-if="pros.listType == 2">{{ pros.label }}</span>
+                                                        <template v-if="(pros.product.productCategory == 1 && params.userId>0) || GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                                            <span class="cm-tag color3" v-if="pros.product.actStatus==1">
+                                                              {{pros.product.promotions.name}}
+                                                              <span class="red" v-if="pros.priceFlag != 1 && PromotionsFormat(pros.product.promotions)">:¥{{pros.product.price | NumFormat}}</span>
+                                                            </span>
+                                                        </template>
                                                     </div>
                                                     <div class="cm-prodcut-price h24">
                                                         <div class="pro-price" v-if="pros.listType == 1">
@@ -95,24 +101,13 @@
                                                                 <template v-if="pros.product.productCategory==1">
                                                                     <!-- 样式1 价格未公开-->
                                                                     <template v-if="pros.product.priceFlag==1">
-                                                                        <div class="price-tag cm-left">
-                                                                            <span class="tag"
-                                                                                  v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
-                                                                        </div>
+                                                                        <div class="price-tag cm-left"></div>
                                                                         <div class="price cm-left">¥价格未公开</div>
                                                                     </template>
                                                                     <template v-else>
                                                                         <!-- 样式2-->
-                                                                        <template
-                                                                                v-if="(pros.product.priceFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                                            <div class="price-tag cm-left">
-                                                                                <span class="tag"
-                                                                                      v-if="pros.product.actStatus==1">
-                                                                                  {{pros.product.promotions.name}}
-                                                                                  <span class="red"
-                                                                                        v-if="pros.priceFlag != 1 && PromotionsFormat(pros.product.promotions)">:¥{{pros.product.price | NumFormat}}</span>
-                                                                                </span>
-                                                                            </div>
+                                                                        <template  v-if="(pros.product.priceFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
+                                                                            <div class="price-tag cm-left"></div>
                                                                             <div class="price cm-left"
                                                                                  :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
                                                                                 <span class="red">
@@ -122,24 +117,17 @@
                                                                             </div>
                                                                         </template>
                                                                         <!-- 样式3 -->
-                                                                        <template
-                                                                                v-else-if="pros.product.priceFlag==2 && pros.product.userIdentity==4 && GLOBAL_VIP_FLAG!=1">
-                                                                            <div class="price-tag cm-left"
-                                                                                 v-if="pros.product.actStatus==1">
-                                                                                <span class="tag">{{pros.product.promotions.name}}</span>
-                                                                            </div>
+                                                                        <template v-else-if="pros.product.priceFlag==2 && pros.product.userIdentity==4 && GLOBAL_VIP_FLAG!=1">
+                                                                            <div class="price-tag cm-left"></div>
                                                                             <div class="price cm-left">
                                                                                 <span>¥会员可见</span></div>
                                                                         </template>
                                                                         <!-- 样式4 -->
                                                                         <template v-else>
-                                                                            <div class="price-tag cm-left"
-                                                                                 v-if="pros.product.actStatus==1">
-                                                                                <span class="tag">{{pros.product.promotions.name}}</span>
-                                                                            </div>
-                                                                            <div class="price cm-left"><span>¥</span>
-                                                                                <span class="p-icon"
-                                                                                      :class="'i'+pros.product.priceGrade"></span>
+                                                                            <div class="price-tag cm-left"></div>
+                                                                            <div class="price cm-left">
+                                                                                <span>¥</span>
+                                                                                <span class="p-icon" :class="'i'+pros.product.priceGrade"></span>
                                                                             </div>
                                                                         </template>
                                                                     </template>
@@ -147,9 +135,7 @@
                                                                 <!-- 样式5 -->
                                                                 <template v-else>
                                                                     <div class="price-tag cm-left"></div>
-                                                                    <div class="price"
-                                                                         v-if="pros.product.detailTalkFlag == '2'">¥价格详聊
-                                                                    </div>
+                                                                    <div class="price"  v-if="pros.product.detailTalkFlag == '2'">¥价格详聊</div>
                                                                     <div class="price cm-left" v-else>
                                                                         <span class="red">¥{{ pros.product.price | NumFormat }}</span>
                                                                     </div>
@@ -158,15 +144,10 @@
                                                             <template v-else>
                                                                 <!-- 样式6 -->
                                                                 <template v-if="pros.product.productCategory == 1">
-                                                                    <div class="price-tag cm-left"
-                                                                         v-if="params.userId>0">
-                                                                        <span class="tag"
-                                                                              v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
-                                                                    </div>
+                                                                    <div class="price-tag cm-left" v-if="params.userId>0"></div>
                                                                     <div class="price cm-left ">
                                                                         <span>¥</span>
-                                                                        <span class="p-icon"
-                                                                              :class="'i'+pros.product.priceGrade"></span>
+                                                                        <span class="p-icon" :class="'i'+pros.product.priceGrade"></span>
                                                                     </div>
                                                                 </template>
                                                                 <!-- 样式7 -->
@@ -176,7 +157,6 @@
                                                                 </template>
                                                             </template>
                                                         </div>
-
                                                     </div>
                                                 </div>
                                             </div>
@@ -245,6 +225,12 @@
                                                 <div class="cm-tags cm-p-t-2 cm-p-b-2 h20">
                                                     <!--                                                     <span class="cm-tag color3" v-if="pros.product.couponsLogo">优惠券</span>-->
                                                     <span class="cm-tag color2" v-if="pros.listType == 2">{{ pros.label }}</span>
+                                                    <template v-if="(pros.product.productCategory == 1 && params.userId>0) || GLOBAL_USER_ID && GLOBAL_USER_ID>0">
+                                                        <span class="cm-tag color3" v-if="pros.product.actStatus==1">
+                                                          {{pros.product.promotions.name}}
+                                                          <span class="red" v-if="pros.priceFlag != 1 && PromotionsFormat(pros.product.promotions)">:¥{{pros.product.price | NumFormat}}</span>
+                                                        </span>
+                                                    </template>
                                                 </div>
                                                 <div class="cm-prodcut-price h24">
                                                     <div class="pro-price cm-clearfix" v-if="pros.listType == 1">
@@ -252,26 +238,14 @@
                                                             <template v-if="pros.product.productCategory == 1">
                                                                 <!-- 样式1 价格未公开-->
                                                                 <template v-if="pros.product.priceFlag == 1">
-                                                                    <div class="price-tag cm-left">
-                                                                            <span class="tag"
-                                                                                  v-if="pros.product.actStatus == 1">{{pros.product.promotions.name}}</span>
-                                                                    </div>
+                                                                    <div class="price-tag cm-left"></div>
                                                                     <div class="price cm-left">¥价格未公开</div>
                                                                 </template>
                                                                 <template v-else>
                                                                     <!-- 样式2-->
-                                                                    <template
-                                                                            v-if="(pros.product.priceFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
-                                                                        <div class="price-tag  cm-left">
-                                                                                <span class="tag"
-                                                                                      v-if="pros.product.actStatus==1">
-                                                                                  {{pros.product.promotions.name}}
-                                                                                  <span class="red"
-                                                                                        v-if="pros.priceFlag != 1 && PromotionsFormat(pros.product.promotions)">:¥{{pros.product.price | NumFormat}}</span>
-                                                                                </span>
-                                                                        </div>
-                                                                        <div class="price  cm-left"
-                                                                             :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
+                                                                    <template v-if="(pros.product.priceFlag==0 && pros.product.userIdentity!=3) || pros.product.userIdentity==2 || (pros.product.userIdentity==3 && pros.product.shopID==GLOBAL_SHOP_ID)">
+                                                                        <div class="price-tag  cm-left"></div>
+                                                                        <div class="price  cm-left" :class="PromotionsFormat(pros.product.promotions) ? 'none' : ''">
                                                                                 <span class="red">
                                                                                   ¥{{(PromotionsFormat(pros.product.promotions) ? pros.product.originalPrice
                                                                                   : pros.product.price) | NumFormat }}
@@ -279,24 +253,15 @@
                                                                         </div>
                                                                     </template>
                                                                     <!-- 样式3 -->
-                                                                    <template
-                                                                            v-else-if="pros.product.priceFlag==2 && pros.product.userIdentity==4 && GLOBAL_VIP_FLAG!=1">
-                                                                        <div class="price-tag cm-left"
-                                                                             v-if="pros.product.actStatus==1">
-                                                                            <span class="tag">{{pros.product.promotions.name}}</span>
-                                                                        </div>
-                                                                        <div class="price cm-left"><span>¥会员可见</span>
-                                                                        </div>
+                                                                    <template v-else-if="pros.product.priceFlag==2 && pros.product.userIdentity==4 && GLOBAL_VIP_FLAG!=1">
+                                                                        <div class="price-tag cm-left" v-if="pros.product.actStatus==1"></div>
+                                                                        <div class="price cm-left"><span>¥会员可见</span></div>
                                                                     </template>
                                                                     <!-- 样式4 -->
                                                                     <template v-else>
-                                                                        <div class="price-tag cm-left"
-                                                                             v-if="pros.product.actStatus==1">
-                                                                            <span class="tag">{{pros.product.promotions.name}}</span>
-                                                                        </div>
+                                                                        <div class="price-tag cm-left" v-if="pros.product.actStatus==1"></div>
                                                                         <div class="price cm-left"><span>¥</span>
-                                                                            <span class="p-icon"
-                                                                                  :class="'i'+pros.product.priceGrade"></span>
+                                                                            <span class="p-icon" :class="'i'+pros.product.priceGrade"></span>
                                                                         </div>
                                                                     </template>
                                                                 </template>
@@ -304,9 +269,7 @@
                                                             <!-- 样式5 -->
                                                             <template v-else>
                                                                 <div class="price-tag cm-left"></div>
-                                                                <div class="price"
-                                                                     v-if="pros.product.detailTalkFlag == '2'">¥价格详聊
-                                                                </div>
+                                                                <div class="price"  v-if="pros.product.detailTalkFlag == '2'">¥价格详聊</div>
                                                                 <div class="price cm-left" v-else>
                                                                     <span class="red">¥{{ pros.product.price | NumFormat }}</span>
                                                                 </div>
@@ -315,14 +278,10 @@
                                                         <template v-else>
                                                             <!-- 样式6 -->
                                                             <template v-if="pros.product.productCategory == 1">
-                                                                <div class="price-tag cm-left" v-if="params.userId>0">
-                                                                        <span class="tag"
-                                                                              v-if="pros.product.actStatus==1">{{pros.product.promotions.name}}</span>
-                                                                </div>
+                                                                <div class="price-tag cm-left" v-if="params.userId>0"></div>
                                                                 <div class="price cm-left ">
                                                                     <span>¥</span>
-                                                                    <span class="p-icon"
-                                                                          :class="'i'+pros.product.priceGrade"></span>
+                                                                    <span class="p-icon" :class="'i'+pros.product.priceGrade"></span>
                                                                 </div>
                                                             </template>
                                                             <!-- 样式7 -->

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

@@ -140,9 +140,9 @@
                             </div>
                             <!-- 促销活动 -->
                             <div v-if="priceObj.actStatus==1 && promotions" class="priceTag">
-                                <i v-if="promotions.type==1 && promotions.mode==1 &&priceObj.priceFlag!=1"
+                                <i v-if="promotions.type==1 && promotions.mode==1 && priceObj.priceFlag!=1"
                                    @click="toggleThisLadder($event)" class="tag icon mIcon"
-                                   v-text="promotions.name+':¥'+toFloat(promotions.touchPrice)"></i>
+                                   v-text="promotions.name+':¥'+toFloat(priceObj.price)"></i>
                                 <i v-else class="tag icon mIcon" @click="toggleThisLadder($event)"
                                    v-text="promotions.name"></i>
                                 <div class="promotion mFixed">
@@ -326,64 +326,64 @@
                                         <p class="sku-text" v-text="pros.unit"></p>
                                         <div class="sku-icon"><i class="icon"></i></div>
                                     </div>
-                                    <div class="sku-popup-viw" v-if="currentIndex === index && pros.isSkuPopup">
+                                    <div class="sku-popup-viw" v-if="currentIndex === index && showSkuPopup">
                                         <div class="sku-title">
-                                            <div class="sku-image"><img :src="pros.image" :alt="pros.name"></div>
+                                            <div class="sku-image"><img :src="handlePros.image" :alt="handlePros.name"></div>
                                             <div class="sku-price">
                                                 <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                                 <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                                     <!--0公开价格 1不公开价格 2仅对会员机构公开-->
-                                                    <div class="main_price_unde" v-if="pros.priceFlag==1">¥价格未公开</div>
+                                                    <div class="main_price_unde" v-if="handlePros.priceFlag==1">¥价格未公开</div>
                                                     <!--机构价仅会员可见 && 用户是普通机构-->
-                                                    <div class="main_price_unde" v-else-if="pros.priceFlag==2 && GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG!=1">
+                                                    <div class="main_price_unde" v-else-if="handlePros.priceFlag==2 && GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG!=1">
                                                         ¥会员可见
                                                     </div>
                                                     <!--机构价仅会员可见 && 用户是普通机构-->
-                                                    <div class="main_price_unde" v-else-if="pros.priceFlag==3 && (GLOBAL_CLUB_TYPE !=1)">
+                                                    <div class="main_price_unde" v-else-if="handlePros.priceFlag==3 && (GLOBAL_CLUB_TYPE !=1)">
                                                         ¥仅医美机构可见
                                                     </div>
                                                     <!-- 资质机构 || (价格全部机构可见 && 普通机构) || (供应商 && 商品为供应商下的商品) || 超级会员用户 -->
                                                     <template
-                                                            v-else-if="GLOBAL_USER_IDENTITY === 2 || (pros.priceFlag === 0 && GLOBAL_USER_IDENTITY === 4) || (GLOBAL_USER_IDENTITY === 3 && pros.shopId === GLOBAL_SHOP_ID) || GLOBAL_VIP_FLAG === 1">
+                                                            v-else-if="GLOBAL_USER_IDENTITY === 2 || (handlePros.priceFlag === 0 && GLOBAL_USER_IDENTITY === 4) || (GLOBAL_USER_IDENTITY === 3 && pros.shopId === GLOBAL_SHOP_ID) || GLOBAL_VIP_FLAG === 1">
                                                         <div class="main_price_show"
-                                                             :class="{none: PromotionsFormat(pros.promotions) || (pros.svipProductFlag === 1 && showVipPriceTag(pros))}">
-                                                            ¥{{ (PromotionsFormat(pros.promotions) || showVipPriceTag(pros) ? pros.originalPrice :
-                                                            pros.price ) | NumFormat }}
+                                                             :class="{none: PromotionsFormat(handlePros.promotions) || (handlePros.svipProductFlag === 1 && showVipPriceTag(handlePros))}">
+                                                            ¥{{ (PromotionsFormat(handlePros.promotions) || showVipPriceTag(handlePros) ? handlePros.originalPrice :
+                                                            handlePros.price ) | NumFormat }}
                                                         </div>
                                                     </template>
                                                     <!--供应商除自己的商品外,也显示价格等级-->
                                                     <div class="price_grade" v-else><span class="bold">¥</span><i
-                                                            :class="'icon mIcon i'+pros.priceGrade"></i></div>
+                                                            :class="'icon mIcon i'+handlePros.priceGrade"></i></div>
                                                     <div class="price_text_tag clear">
-                                                        <p class="couponTag" v-if="pros.couponsLogo">优惠券</p>
-                                                        <template v-if="pros.svipProductFlag === 1">
+                                                        <p class="couponTag" v-if="handlePros.couponsLogo">优惠券</p>
+                                                        <template v-if="handlePros.svipProductFlag === 1">
                                                             <div class="svip-tag">
                                                                 <div class="svip-icon">SVIP</div>
-                                                                <template v-if="showVipPriceTag(pros)">
+                                                                <template v-if="showVipPriceTag(handlePros)">
                                                                     <div class="svip-price">
-                                                                        <span v-html="pros.svipPriceTag"></span>
+                                                                        <span v-html="handlePros.svipPriceTag"></span>
                                                                     </div>
                                                                 </template>
                                                             </div>
                                                         </template>
                                                         <template v-else>
-                                                            <p class="listTag" v-if="pros.actStatus==1">{{pros.promotions.name}}
-                                                                <span v-if="pros.priceFlag != 1 && PromotionsFormat(pros.promotions)">:¥{{pros.price | NumFormat}}</span>
+                                                            <p class="listTag" v-if="handlePros.actStatus==1">{{handlePros.promotions.name}}
+                                                                <span v-if="handlePros.priceFlag != 1 && PromotionsFormat(handlePros.promotions)">:¥{{handlePros.price | NumFormat}}</span>
                                                             </p>
                                                         </template>
                                                     </div>
                                                 </template>
                                                 <template v-else>
-                                                    <div class="price_grade"><i :class="'icon mIcon i'+pros.priceGrade"></i></div>
+                                                    <div class="price_grade"><i :class="'icon mIcon i'+handlePros.priceGrade"></i></div>
                                                     <div class="price_text_tag">
-                                                        <p class="couponTag" v-if="pros.couponsLogo">优惠券</p>
-                                                        <template v-if="pros.svipProductFlag === 1">
+                                                        <p class="couponTag" v-if="handlePros.couponsLogo">优惠券</p>
+                                                        <template v-if="handlePros.svipProductFlag === 1">
                                                             <div class="svip-tag">
                                                                 <div class="svip-icon">SVIP</div>
                                                             </div>
                                                         </template>
                                                         <template v-else>
-                                                            <p class="listTag" v-if="pros.actStatus==1">{{pros.promotions.name}}</p>
+                                                            <p class="listTag" v-if="handlePros.actStatus==1">{{handlePros.promotions.name}}</p>
                                                         </template>
                                                     </div>
                                                 </template>
@@ -391,7 +391,7 @@
                                         </div>
                                         <div class="sku-h1">规格:</div>
                                         <div class="sku-unit">
-                                                <span class="unitTags" @click="handleSupportingChoisSku(pros,sku,index)" v-for="(sku, index) in pros.skus" :key="index" :class="skuSupportingIndex === index ? 'active':''">
+                                                <span class="unitTags" @click="handleSupportingChoisSku(pros,sku,index)" v-for="(sku, index) in handlePros.skus" :key="index" :class="skuSupportingIndex === index ? 'active':''">
                                                     {{ sku.unit }}
                                                     <i class="tips" v-if="sku.stock ===0">缺货</i>
                                                 </span>

+ 22 - 22
src/main/resources/templates/product/product-supporting.html

@@ -45,65 +45,65 @@
                             <p class="sku-text" v-text="pros.unit"></p>
                             <div class="sku-icon"><i class="mIcon"></i></div>
                         </div>
-                        <div class="sku-popup-model" v-if="pros.isSkuPopup"></div>
-                        <div class="sku-popup-viw" v-if="currentIndex === index && pros.isSkuPopup">
+                        <div class="sku-popup-model" v-if="showSkuPopup"></div>
+                        <div class="sku-popup-viw" v-if="currentIndex === index && showSkuPopup">
                             <div class="sku-title">
-                                <div class="sku-image"><img :src="pros.image" :alt="pros.name"></div>
+                                <div class="sku-image"><img :src="handlePros.image" :alt="handlePros.name"></div>
                                 <div class="sku-price">
                                     <!--用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构-->
                                     <template v-if="GLOBAL_USER_ID && GLOBAL_USER_ID>0">
                                         <!--0公开价格 1不公开价格 2仅对会员机构公开-->
-                                        <div class="main_price_unde" v-if="pros.priceFlag==1">¥价格未公开</div>
+                                        <div class="main_price_unde" v-if="handlePros.priceFlag==1">¥价格未公开</div>
                                         <!--机构价仅会员可见 && 用户是普通机构-->
-                                        <div class="main_price_unde" v-else-if="pros.priceFlag==2 && GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG!=1">
+                                        <div class="main_price_unde" v-else-if="handlePros.priceFlag==2 && GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG!=1">
                                             ¥会员可见
                                         </div>
                                         <!--机构价仅会员可见 && 用户是普通机构-->
-                                        <div class="main_price_unde" v-else-if="pros.priceFlag==3 && (GLOBAL_CLUB_TYPE !=1)">
+                                        <div class="main_price_unde" v-else-if="handlePros.priceFlag==3 && (GLOBAL_CLUB_TYPE !=1)">
                                             ¥仅医美机构可见
                                         </div>
                                         <!-- 资质机构 || (价格全部机构可见 && 普通机构) || (供应商 && 商品为供应商下的商品) || 超级会员用户 -->
                                         <template
-                                                v-else-if="GLOBAL_USER_IDENTITY === 2 || (pros.priceFlag === 0 && GLOBAL_USER_IDENTITY === 4) || (GLOBAL_USER_IDENTITY === 3 && pros.shopId === GLOBAL_SHOP_ID) || GLOBAL_VIP_FLAG === 1">
+                                                v-else-if="GLOBAL_USER_IDENTITY === 2 || (handlePros.priceFlag === 0 && GLOBAL_USER_IDENTITY === 4) || (GLOBAL_USER_IDENTITY === 3 && handlePros.shopId === GLOBAL_SHOP_ID) || GLOBAL_VIP_FLAG === 1">
                                             <div class="main_price_show"
-                                                 :class="{none: PromotionsFormat(pros.promotions) || (pros.svipProductFlag === 1 && showVipPriceTag(pros))}">
-                                                ¥{{ (PromotionsFormat(pros.promotions) || showVipPriceTag(pros) ? pros.originalPrice :
-                                                pros.price ) | NumFormat }}
+                                                 :class="{none: PromotionsFormat(handlePros.promotions) || (handlePros.svipProductFlag === 1 && showVipPriceTag(handlePros))}">
+                                                ¥{{ (PromotionsFormat(handlePros.promotions) || showVipPriceTag(handlePros) ? handlePros.originalPrice :
+                                                handlePros.price ) | NumFormat }}
                                             </div>
                                         </template>
                                         <!--供应商除自己的商品外,也显示价格等级-->
                                         <div class="price_grade" v-else><span class="bold">¥</span><i
-                                                :class="'icon mIcon i'+pros.priceGrade"></i></div>
+                                                :class="'icon mIcon i'+handlePros.priceGrade"></i></div>
                                         <div class="price_text_tag clear">
-                                            <p class="couponTag" v-if="pros.couponsLogo">优惠券</p>
-                                            <template v-if="pros.svipProductFlag === 1">
+                                            <p class="couponTag" v-if="handlePros.couponsLogo">优惠券</p>
+                                            <template v-if="handlePros.svipProductFlag === 1">
                                                 <div class="svip-tag">
                                                     <div class="svip-icon">SVIP</div>
-                                                    <template v-if="showVipPriceTag(pros)">
+                                                    <template v-if="showVipPriceTag(handlePros)">
                                                         <div class="svip-price">
-                                                            <span v-html="pros.svipPriceTag"></span>
+                                                            <span v-html="handlePros.svipPriceTag"></span>
                                                         </div>
                                                     </template>
                                                 </div>
                                             </template>
                                             <template v-else>
-                                                <p class="listTag" v-if="pros.actStatus==1">{{pros.promotions.name}}
-                                                    <span v-if="pros.priceFlag != 1 && PromotionsFormat(pros.promotions)">:¥{{pros.price | NumFormat}}</span>
+                                                <p class="listTag" v-if="handlePros.actStatus==1">{{handlePros.promotions.name}}
+                                                    <span v-if="handlePros.priceFlag != 1 && PromotionsFormat(handlePros.promotions)">:¥{{handlePros.price | NumFormat}}</span>
                                                 </p>
                                             </template>
                                         </div>
                                     </template>
                                     <template v-else>
-                                        <div class="price_grade"><span class="bold">¥</span><i :class="'icon mIcon i'+pros.priceGrade"></i></div>
+                                        <div class="price_grade"><span class="bold">¥</span><i :class="'icon mIcon i'+handlePros.priceGrade"></i></div>
                                         <div class="price_text_tag">
-                                            <p class="couponTag" v-if="pros.couponsLogo">优惠券</p>
-                                            <template v-if="pros.svipProductFlag === 1">
+                                            <p class="couponTag" v-if="handlePros.couponsLogo">优惠券</p>
+                                            <template v-if="handlePros.svipProductFlag === 1">
                                                 <div class="svip-tag">
                                                     <div class="svip-icon">SVIP</div>
                                                 </div>
                                             </template>
                                             <template v-else>
-                                                <p class="listTag" v-if="pros.actStatus==1">{{pros.promotions.name}}</p>
+                                                <p class="listTag" v-if="handlePros.actStatus==1">{{handlePros.promotions.name}}</p>
                                             </template>
                                         </div>
                                     </template>
@@ -111,7 +111,7 @@
                             </div>
                             <div class="sku-h1">规格:</div>
                             <div class="sku-unit">
-                                <span class="unitTags" @click="handleSupportingChoisSku(pros,sku,index)" v-for="(sku, index) in pros.skus" :key="index" :class="skuSupportingIndex === index ? 'active':''">
+                                <span class="unitTags" @click="handleSupportingChoisSku(pros,sku,index)" v-for="(sku, index) in handlePros.skus" :key="index" :class="skuSupportingIndex === index ? 'active':''">
                                     {{ sku.unit }}
                                     <i class="tips" v-if="sku.stock ===0">缺货</i>
                                 </span>

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

@@ -17,7 +17,7 @@
         <h1>【{{promotions.name}}】 {{promotions.description}}</h1>
         <p><span>促销时间:</span>
             <em v-if="promotions.status==1">不限时</em>
-            <em v-else>{{promotions.beginTime.substr(0,10)+' ~ '+promotions.endTime.substr(0,10)}}</em>
+            <em v-else>{{promotions.beginTime && promotions.beginTime.substr(0,10)+' ~ '+promotions.endTime && promotions.endTime.substr(0,10)}}</em>
         </p>
         <p>下面为参与本次凑单活动的全部商品:</p>
     </div>

+ 3 - 1
src/main/resources/templates/supplier/index.html

@@ -81,7 +81,9 @@
                                                 <template v-else>
                                                     <p class="listTag" v-if="p.actStatus==1">
                                                         {{p.promotions.name}}
-                                                        <span v-if="p.priceFlag != 1 && PromotionsFormat(p.promotions)">:¥{{p.price | NumFormat}}</span>
+                                                        <template v-if="GLOBAL_USER_IDENTITY === 2 || (p.priceFlag === 0 && GLOBAL_USER_IDENTITY === 4) || (GLOBAL_USER_IDENTITY === 3 && p.shopId === GLOBAL_SHOP_ID) || GLOBAL_VIP_FLAG === 1">
+                                                            <span v-if="p.priceFlag != 1 && PromotionsFormat(p.promotions)">:¥{{p.price | NumFormat}}</span>
+                                                        </template>
                                                     </p>
                                                 </template>
                                             </div>