|
@@ -178,8 +178,10 @@ var productDetail = new Vue({
|
|
|
ProductApi.GetProductDdtails({userId: GLOBAL_USER_ID, productId: _self.productId,typeId:_self.typeId}, function (response) {
|
|
|
if (response.code == 0) {
|
|
|
var product = response.data;
|
|
|
- var $pageLabel = '';
|
|
|
_self.product = response.data;
|
|
|
+ // 设置统计商品详情标签
|
|
|
+ _self.cmSysParams.pageLabel = _self.handleSysPgeLabe(response.data);
|
|
|
+ console.log('pageLabel',_self.cmSysParams.pageLabel)
|
|
|
_self.pcActType = product.pcActType;
|
|
|
_self.productStock = product.stock;
|
|
|
_self.addParams.skuId = product.skus[0].skuId;
|
|
@@ -192,19 +194,6 @@ var productDetail = new Vue({
|
|
|
_self.productDetailChose = product.productDetailChose; // 同资质机构显示商品详情
|
|
|
_self.returnGoodsStutas = product.returnGoodsStutas === 2 // 当前商品是否为特殊商品 1不是 2是
|
|
|
_self.helpContent = product.helpContent
|
|
|
- if(product.tinyTypeName){
|
|
|
- $pageLabel = product.tinyTypeName
|
|
|
- }else if(!product.tinyTypeName && product.smallTypeName){
|
|
|
- $pageLabel = product.smallTypeName
|
|
|
- }else{
|
|
|
- $pageLabel = product.bigTypeName
|
|
|
- }
|
|
|
- // 设置统计商品详情标签
|
|
|
- if(product.relatedLabels){
|
|
|
- _self.cmSysParams.pageLabel = product.relatedLabels;
|
|
|
- }else{
|
|
|
- _self.cmSysParams.pageLabel = `${$pageLabel}-${product.brandName?product.brandName:''}`;
|
|
|
- }
|
|
|
if(product.shopType == 2){
|
|
|
_self.isShowCaimeiShop = true
|
|
|
}
|
|
@@ -261,6 +250,21 @@ var productDetail = new Vue({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ handleSysPgeLabe(pro){// 设置统计标签
|
|
|
+ let pageLabel = '';
|
|
|
+ if(pro.relatedLabels){
|
|
|
+ return pro.relatedLabels
|
|
|
+ }else{
|
|
|
+ if(pro.tinyTypeName){
|
|
|
+ pageLabel = pro.tinyTypeName
|
|
|
+ }else if(!pro.tinyTypeName && pro.smallTypeName){
|
|
|
+ pageLabel = pro.smallTypeName
|
|
|
+ }else{
|
|
|
+ pageLabel = pro.bigTypeName
|
|
|
+ }
|
|
|
+ return `${pageLabel}-${pro.brandName?pro.brandName:''}`
|
|
|
+ }
|
|
|
+ },
|
|
|
handleShowProductType: function (flag = ''){
|
|
|
// 根据商品详情可见度显示弹窗 flag 1.所有人可见 2.所有机构可见 3.仅会员机构可见 4.仅医美机构可见
|
|
|
let showModal = false;
|
|
@@ -333,7 +337,6 @@ var productDetail = new Vue({
|
|
|
_self.promotions = response.data.promotions;
|
|
|
_self.promotionsId = response.data.promotions.id;
|
|
|
}
|
|
|
- console.log('priceObj',_self.priceObj)
|
|
|
if(_self.userId === 0 || GLOBAL_USER_IDENTITY === 2 || GLOBAL_USER_IDENTITY === 4){
|
|
|
_self.isShowSupportingList = true;
|
|
|
}
|