浏览代码

项目详情增加userId字段参数

zhengjinyi 3 年之前
父节点
当前提交
5228798fd8

+ 5 - 1
src/main/resources/static/js/equipment/detail.js

@@ -13,7 +13,11 @@ var equipmentDetail = new Vue({
             if(this.equipmentId ===0){return;}
             ProductApi.GetEquipmentDdtailsRecommend({ equipmentId: this.equipmentId,userId:_self.userId},function (response) {
                 if (response.code === 0 && response.data) {
-                    _self.recommends = r.data;
+                    _self.recommends = response.data;
+                }else if(response.code === 1){
+                    window.location.href = "/404.html?error=未查询到该商品";
+                }else{
+                    CAIMEI.Alert(response.msg, '确定', false);
                 }
             });
         }

+ 11 - 2
src/main/resources/static/js/product/detail.js

@@ -683,8 +683,17 @@ var productDetail = new Vue({
             _self.defaultSupportingList = _self.supportingList;
         },
         // 是否显示vip标签价格
-        showVipPriceTag(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;
         },
     },
     created: function () {

+ 1 - 2
src/main/resources/templates/product/detail.html

@@ -456,8 +456,7 @@
                         </template>
                     </template>
                     <template v-else>
-                        <p style="text-align: left;">请电话联系采美客服或扫码添加客服微信好友咨询商品详细信息。</p>
-                        <p style="text-align: left;font-weight: bold;color: #333333;">请大家提高紧惕,防范虚假产品宣传。</p>
+                        <p style="text-align: left;">若要查看更多产品信息,请注册机构会员,如有疑问请联系客服。</p>
                     </template>
                 </div>
                 <div class="item" v-if="tabsIndex == 1">