diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/goods/goodDetails/goodDetails.vue b/CoreCms.Net.Uni-App/CoreShop/pages/goods/goodDetails/goodDetails.vue index db873b3c..ef2d78af 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/goods/goodDetails/goodDetails.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/goods/goodDetails/goodDetails.vue @@ -730,8 +730,18 @@ console.log(res.otherData.agentProducts); _this.agentProducts = res.otherData.agentProducts; } - _this.userAgentGrade = res.otherData.userAgentGrade; - _this.userAgent = res.otherData.userAgent; + + if (res.otherData && res.otherData.userAgentGrade) { + _this.userAgentGrade = res.otherData.userAgentGrade; + } else { + _this.userAgentGrade = null; + } + + if (res.otherData && res.otherData.userAgent) { + _this.userAgent = res.otherData.userAgent; + } else { + _this.userAgent = null; + } //价格区间 if (res.data.minPrice != res.data.maxPrice) { @@ -782,11 +792,23 @@ _this.product = res.data.product; _this.goodsSkuInfo = res.data.skuList; + if (res.otherData && res.otherData.userAgentGrade) { + _this.userAgentGrade = res.otherData.userAgentGrade; + } else { + _this.userAgentGrade = null; + } + + if (res.otherData && res.otherData.userAgent) { + _this.userAgent = res.otherData.userAgent; + } else { + _this.userAgent = null; + } + //价格区间 if (res.data.minPrice != res.data.maxPrice) { _this.priceSection = res.data.minPrice + '~' + res.data.maxPrice; } else { - _this.priceSection = res.data.product.price; + _this.priceSection = res.data.product.mktprice; } if (_this.goodsInfo.album) {