客服:完善订单消息发送

This commit is contained in:
puhui999
2024-07-09 17:34:18 +08:00
parent b630d26d4b
commit 39440c1e67
4 changed files with 102 additions and 172 deletions
+2 -23
View File
@@ -121,34 +121,13 @@
case 'goods':
msg = {
contentType: KeFuMessageContentTypeEnum.PRODUCT,
content: JSON.stringify({
id: data.id,
spuName: data.spuName,
picUrl: data.picUrl,
price: data.price,
introduction: data.introduction,
stock: data.stock,
})
content: JSON.stringify(data)
};
break;
case 'order':
msg = {
contentType: KeFuMessageContentTypeEnum.ORDER,
content: {
item: {
id: data.id,
order_sn: data.order_sn,
create_time: data.create_time,
pay_fee: data.pay_fee,
items: data.items.filter((item) => ({
goods_id: item.goods_id,
goods_title: item.goods_title,
goods_image: item.goods_image,
goods_price: item.goods_price,
})),
status_text: data.status_text,
},
},
content: JSON.stringify(data),
};
break;
}