Selaa lähdekoodia

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

yuwenjun1997 2 vuotta sitten
vanhempi
commit
573ac632a6
1 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 5 5
      src/main/resources/static/js/product/detail.js

+ 5 - 5
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){
@@ -691,13 +691,13 @@ var productDetail = new Vue({
         // 是否显示vip标签价格
         showVipPriceTag: function(pros){
             //非会员
-            if(!GLOBAL_VIP_FLAG === 1) return false;
+            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;
+            if(pros.priceFlag === 3  && pros.svipProductFlag === 1 && GLOBAL_USER_IDENTITY === 2 &&  GLOBAL_CLUB_TYPE === 1) return true;
             // 其它
             return false;
         },