Quellcode durchsuchen

商品械字号显隐修改

zhengjinyi vor 3 Jahren
Ursprung
Commit
9b1456185f
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 4 2
      src/main/resources/static/js/product/detail.js

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

@@ -779,11 +779,13 @@ var productDetail = new Vue({
         this.productStock = $("#productStock").val();
         this.getImages();
         // identity: 0个人,1协销,2会员机构,3供应商,4普通机构
-        // visibility:3:所有人可见,2:普通机构可见,1:会员机构可见
+        // visibility:3:所有人可见,2:普通机构可见,1:会员机构可见 4:仅医美机构可见
         var visible = $("#productVisibility").val() * 1;
+        console.log('visible',visible)
         var identity = GLOBAL_USER_IDENTITY;
         this.identity = identity
-        this.showProduct = visible === 3 || identity === 1 || identity === 2 || (identity === 4 && visible === 2);
+        console.log('identity',identity)
+        this.showProduct = visible === 3 || visible == 4 || identity === 1 || identity === 2 || (identity === 4 && visible === 2);
         if (!this.showProduct) {
             window.location.href = "/404.html?error=未查询到该商品";
         }