From 09ce16dc95e3ea447532f40ae015176a6927c7b1 Mon Sep 17 00:00:00 2001
From: chc <1501738723@qq.com>
Date: Thu, 1 Jun 2023 10:10:51 +0800
Subject: [PATCH] =?UTF-8?q?IM=E6=90=BA=E5=B8=A6=E5=95=86=E5=93=81=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
buyer/src/components/mixes/talkIm.vue | 16 ++++++++++++----
buyer/src/pages/GoodsDetail.vue | 2 +-
buyer/src/pages/Merchant.vue | 2 +-
3 files changed, 14 insertions(+), 6 deletions(-)
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 ? '已收藏店铺' : '收藏店铺'
}}
- 联系客服