Bläddra i källkod

医美机构价格可见度修改
商品详情仅对资质机构可见

zhengjinyi 3 år sedan
förälder
incheckning
5e840b48da

+ 2 - 1
src/main/resources/static/css/base/floor.css

@@ -41,7 +41,8 @@
 .section_page .page_main_price .main_price_none{width:100%;height:24px;box-sizing:border-box;float:left;margin-top:2px}
 .section_page .page_main_price .main_price_none.sec{margin-top:25px}
 .section_page .page_main_price .main_price_none .listTag{margin:0}
-.section_page .page_main_price .price_grade,.section_page .page_main_price .price_grade_shop,.section_page .page_main_price .price_grade_club{float:left;margin:0;height:22px;line-height:22px;color:#4A4F58;font-style:normal;font-size:14px}
+.section_page .page_main_price .price_grade,.section_page .page_main_price .price_grade_shop{float:left;margin:0;height:22px;line-height:22px;color:#4A4F58;font-style:normal;font-size:14px}
+.section_page .page_main_price .price_grade_club{float:left;margin:0;height:22px;line-height:22px;color:#4A4F58;font-style:normal;font-size:14px;color: #f94b4b;}
 .section_page .page_main_price .price_grade{float: unset}
 .section_page .page_main_price .price_grade span,.section_page .page_main_price .price_grade_shop span,.section_page .page_main_price .price_grade_club span{display:inline-block;float:left}
 .section_page .page_main_price .icon:before{width:67px;height:22px}

+ 0 - 1
src/main/resources/static/css/index/index_new.pc.css

@@ -24,7 +24,6 @@ li{list-style:none;}
 .section_container{width:100%;height:auto;float:left}
 .section_container .inner{width:1184px;margin:0 auto}
 .section_left{width:900px;float:left}
-
 /*右边区域*/
 .section_right{width:284px;float:right;box-sizing:border-box;padding-top:103px}
 .section_right .section_right_item{width:284px;height:auto;background-color:#FFFFFF;float:left;margin-bottom:16px;padding:16px;box-sizing:border-box;border-radius:2px}

+ 1 - 0
src/main/resources/static/js/account/bind.js

@@ -51,6 +51,7 @@ var bindPage = new Vue({
                             clubId: response.data.clubId,
                             shopId: response.data.shopId,
                             userIdentity: response.data.userIdentity,
+                            firstClubType: response.data.firstClubType,
                             permission: response.data.userPermission,
                             token: response.data.token
                         };

+ 3 - 1
src/main/resources/static/js/account/login.js

@@ -105,6 +105,7 @@ var loginPage = new Vue({
                             permission: response.data.userPermission,
                             token: response.data.token,
                             unionId:response.data.unionId,
+                            firstClubType:response.data.firstClubType,
                             vipFlag: response.data.vipFlag
                         };
                         _self.setStorages( _self.userData);
@@ -215,7 +216,8 @@ var loginPage = new Vue({
                             userIdentity: response.data.userIdentity,
                             permission: response.data.userPermission,
                             token: response.data.token,
-                            vipFlag: response.data.vipFlag
+                            vipFlag: response.data.vipFlag,
+                            firstClubType: response.data.firstClubType
                         };
                         _self.setStorages( _self.userData);
                         // 登录成功页面跳转

+ 11 - 2
src/main/resources/static/js/index.js

@@ -19,8 +19,17 @@ var homeData = 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(pros){
+            //非会员
+            if(!GLOBAL_VIP_FLAG === 1) return false;
+            // 商品所有机构可见
+            if(pros.priceFlag === 0 ) return true;
+            // 商品价格仅资质机构可见
+            if(pros.priceFlag === 2 && GLOBAL_USER_IDENTITY === 2) return true;
+            // 商品价格仅医美机构可见
+            if(pros.priceFlag === 3 && GLOBAL_USER_IDENTITY === 2 &&  GLOBAL_CLUB_TYPE == 1) return true;
+            // 其它
+            return false;
         },
         popupPage:function(){  // 弹窗点击跳转链接
             var _self = this;

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

@@ -193,20 +193,20 @@
                                                         <template v-if="pros.product.priceFlag == 1">
                                                             <em class="price_grade"><span>¥</span>价格未公开</em>
                                                         </template>
-                                                        <!-- 资质机构 || (价格全部机构可见 && 普通机构) || (供应商 && 商品为供应商下的商品) || 超级会员用户 -->
-                                                        <template v-else-if="GLOBAL_USER_IDENTITY === 2 || (pros.product.priceFlag === 0 && GLOBAL_USER_IDENTITY === 4) || (GLOBAL_USER_IDENTITY === 3 && pros.product.shopID==GLOBAL_SHOP_ID) || GLOBAL_VIP_FLAG === 1">
-                                                            <div class="main_price_show" :class="{none: showVipPriceTag(pros.product) || PromotionsFormat(pros.product.promotions)}">
-                                                                ¥<span class="price_num" v-if="showVipPriceTag(pros.product)">{{ pros.product.originalPrice | NumFormat }}</span>
-                                                                <span class="price_num" v-else>{{ pros.product.price | NumFormat }}</span>
-                                                            </div>
-                                                        </template>
                                                         <!--机构价仅会员可见 && 用户是普通机构-->
                                                         <template v-else-if="pros.product.priceFlag==2 && GLOBAL_USER_IDENTITY === 4">
                                                             <em class="price_grade_club"><span>¥</span>会员可见</em>
                                                         </template>
                                                         <!--机构价仅医美机构可见-->
                                                         <template v-else-if="pros.product.priceFlag==3 && (GLOBAL_CLUB_TYPE !=1)">
-                                                            <em class="price_grade_club"><span>¥</span>仅医美机构可见</em>
+                                                            <em class="price_grade_club red"><span>¥</span>仅医美机构可见</em>
+                                                        </template>
+                                                        <!-- 资质机构 || (价格全部机构可见 && 普通机构) || (供应商 && 商品为供应商下的商品) || 超级会员用户 -->
+                                                        <template v-else-if="GLOBAL_USER_IDENTITY === 2 || (pros.product.priceFlag === 0 && GLOBAL_USER_IDENTITY === 4) || (GLOBAL_USER_IDENTITY === 3 && pros.product.shopID==GLOBAL_SHOP_ID) || GLOBAL_VIP_FLAG === 1">
+                                                            <div class="main_price_show" :class="{none: showVipPriceTag(pros.product) || PromotionsFormat(pros.product.promotions)}">
+                                                                ¥<span class="price_num" v-if="showVipPriceTag(pros.product)">{{ pros.product.originalPrice | NumFormat }}</span>
+                                                                <span class="price_num" v-else>{{ pros.product.price | NumFormat }}</span>
+                                                            </div>
                                                         </template>
                                                         <template v-else>
                                                             <!--供应商除自己的商品外,也显示价格等级-->