diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue index c0c6637..0b194e5 100644 --- a/pages/goods/detail.vue +++ b/pages/goods/detail.vue @@ -828,6 +828,7 @@ }, //跳转京东小程序详情 toJDdetal() { + console.log(this.goods_sku_no); wx.navigateToMiniProgram({ appId: 'wx91d27dbf599dff74', path: '/pages/item/detail/detail?sku=' + this.goods_sku_no, @@ -1088,7 +1089,10 @@ that.isTodo = true; that.goods_sku_no = "" if (info.skuList && info.skuList.length > 0) { - that.goods_sku_no = info.skuList[0].goods_sku_no + if (info.goods_id) { + that.goods_sku_no = info.skuList.filter(item => item.goods_id === info.goods_id)[0].goods_sku_no; + } + // that.goods_sku_no = info.skuList[0].goods_sku_no } that.allPicture = info.goods_images.length; if (type == 1) { diff --git a/pages/goods/seckillDetail.vue b/pages/goods/seckillDetail.vue index 20d2c22..31365c3 100644 --- a/pages/goods/seckillDetail.vue +++ b/pages/goods/seckillDetail.vue @@ -978,7 +978,10 @@ that.isTodo = true; that.goods_sku_no = "" if (info.skuList && info.skuList.length > 0) { - that.goods_sku_no = info.skuList[0].goods_sku_no + if (info.goods_id) { + that.goods_sku_no = info.skuList.filter(item => item.goods_id === info.goods_id)[0].goods_sku_no; + } + // that.goods_sku_no = info.skuList[0].goods_sku_no } that.allPicture = info.goods_images.length; if (type == 1) {