|
@@ -1,6 +1,7 @@
|
|
|
var productDetail = new Vue({
|
|
|
el: "#productDetail",
|
|
|
data: {
|
|
|
+ showProduct: false,
|
|
|
productId: 0,
|
|
|
userId: 0,
|
|
|
number: 0,
|
|
@@ -206,7 +207,8 @@ var productDetail = new Vue({
|
|
|
if(!this.productId){return;}
|
|
|
$.getJSON(spiServer + "/product/detail/recommend",{
|
|
|
productId: this.productId,
|
|
|
- recommendType: this.recommendType
|
|
|
+ recommendType: this.recommendType,
|
|
|
+ identity: GLOBAL_USER_IDENTITY
|
|
|
}).done(function (r) {
|
|
|
if (r.code === 0 && r.data) {
|
|
|
if(r.data.length > 0){
|
|
@@ -251,6 +253,11 @@ var productDetail = new Vue({
|
|
|
this.productId = $("#productId").val();
|
|
|
this.productStock = $("#productStock").val();
|
|
|
this.getImages();
|
|
|
+ // identity: 0个人,1协销,2会员机构,3供应商,4普通机构
|
|
|
+ // visibility:3:所有人可见,2:普通机构可见,1:会员机构可见
|
|
|
+ var visible = $("#productVisibility").val()*1;
|
|
|
+ var identity = GLOBAL_USER_IDENTITY;
|
|
|
+ this.showProduct = (identity === 1 || identity === 2) || (identity === 4 && (visible === 2 || visible === 3)) || (visible === 3);
|
|
|
},
|
|
|
mounted: function () {
|
|
|
this.userId = GLOBAL_USER_ID;
|