Bladeren bron

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

yuwenjun1997 2 jaren geleden
bovenliggende
commit
12c7fe62f6
1 gewijzigde bestanden met toevoegingen van 15 en 15 verwijderingen
  1. 15 15
      src/main/resources/static/js/product/detail.js

+ 15 - 15
src/main/resources/static/js/product/detail.js

@@ -100,9 +100,9 @@ var productDetail = new Vue({
     },
     methods: {
         // 是否显示vip标签价格
-        // showVipPriceTag: function(product){
-        //     return (product.priceFlag !== 1 && product.svipProductFlag === 1 && ((GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG === 1) || GLOBAL_USER_IDENTITY === 2));
-        // },
+        showVipPriceTag: function(product){
+            return (product.priceFlag !== 1 && product.svipProductFlag === 1 && ((GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG === 1) || GLOBAL_USER_IDENTITY === 2));
+        },
         PromotionsFormat:function(promo){//促销活动类型数据处理
             if(promo!=null){
                 if(promo.type == 1 && promo.mode == 1){
@@ -689,18 +689,18 @@ var productDetail = new Vue({
             _self.defaultSupportingList = _self.supportingList;
         },
         // 是否显示vip标签价格
-        showVipPriceTag: function(pros){
-            //非会员
-            if(GLOBAL_VIP_FLAG !== 1) return false;
-            // 商品所有机构可见
-            if(pros.priceFlag === 0  && pros.svipProductFlag === 1 ) return true;
-            // 商品价格仅资质机构可见
-            if(pros.priceFlag === 2  && pros.svipProductFlag === 1 && GLOBAL_USER_IDENTITY === 2) return true;
-            // 商品价格仅医美机构可见
-            if(pros.priceFlag === 3  && pros.svipProductFlag === 1 && GLOBAL_USER_IDENTITY === 2 &&  GLOBAL_CLUB_TYPE === 1) return true;
-            // 其它
-            return false;
-        },
+        // showVipPriceTag: function(pros){
+        //     //非会员
+        //     // if(GLOBAL_VIP_FLAG !== 1) return false;
+        //     // 商品所有机构可见
+        //     if(pros.priceFlag === 0  && pros.svipProductFlag === 1 ) return true;
+        //     // 商品价格仅资质机构可见
+        //     if(pros.priceFlag === 2  && pros.svipProductFlag === 1 && GLOBAL_USER_IDENTITY === 2) return true;
+        //     // 商品价格仅医美机构可见
+        //     if(pros.priceFlag === 3  && pros.svipProductFlag === 1 && GLOBAL_USER_IDENTITY === 2 &&  GLOBAL_CLUB_TYPE === 1) return true;
+        //     // 其它
+        //     return false;
+        // },
     },
     created: function () {
         this.productId = this.couponParam.productId = this.addParams.productId = this.listQuery.productId =  this.handleProsId = $("#productId").val();