diff --git a/buyer/src/components/mixes/talkIm.vue b/buyer/src/components/mixes/talkIm.vue index a50e3cab..ab7c5df1 100644 --- a/buyer/src/components/mixes/talkIm.vue +++ b/buyer/src/components/mixes/talkIm.vue @@ -15,16 +15,24 @@ export default { }, methods: { // 跳转im客服 - async IMService(id) { + async IMService(id, goodsId, skuId) { // 获取访问Token let accessToken = Storage.getItem("accessToken"); await this.getIMDetailMethods(); const userInfo = await getMemberMsg(); if (userInfo.success) { - window.open( - this.IMLink + "?token=" + accessToken + "&id=" + id || this.storeMsg.storeId - ); + //携带商品Id,在IM可以发送商品信息 + if(goodsId && skuId){ + window.open( + this.IMLink + "?token=" + accessToken + "&id=" + id || this.storeMsg.storeId + "&goodsId=" + goodsId + "&skuId=" + skuId + ); + }else{ + window.open( + this.IMLink + "?token=" + accessToken + "&id=" + id || this.storeMsg.storeId + ); + } + } else { this.$Message.error("请登录后再联系客服"); return; diff --git a/buyer/src/pages/GoodsDetail.vue b/buyer/src/pages/GoodsDetail.vue index 89685d2c..22820f71 100644 --- a/buyer/src/pages/GoodsDetail.vue +++ b/buyer/src/pages/GoodsDetail.vue @@ -22,7 +22,7 @@ {{ storeCollected? "已收藏店铺": "收藏店铺" }} - 联系客服 + 联系客服 diff --git a/buyer/src/pages/Merchant.vue b/buyer/src/pages/Merchant.vue index a1ae5ca0..d773cdfe 100644 --- a/buyer/src/pages/Merchant.vue +++ b/buyer/src/pages/Merchant.vue @@ -14,7 +14,7 @@ type="ios-heart"/>{{ storeCollected ? '已收藏店铺' : '收藏店铺' }} - 联系客服