客服:完善商品消息发送

This commit is contained in:
puhui999
2024-07-09 16:17:56 +08:00
parent d9efd4e2e6
commit b630d26d4b
4 changed files with 29 additions and 47 deletions
+8 -10
View File
@@ -118,19 +118,17 @@
content: res.data,
};
break;
// TODO puhui999: 还需要重构
case 'goods':
msg = {
contentType: KeFuMessageContentTypeEnum.PRODUCT,
content: {
item: {
id: data.goods.id,
title: data.goods.title,
image: data.goods.image,
price: data.goods.price,
stock: data.goods.stock,
},
},
content: JSON.stringify({
id: data.id,
spuName: data.spuName,
picUrl: data.picUrl,
price: data.price,
introduction: data.introduction,
stock: data.stock,
})
};
break;
case 'order':