> For the complete documentation index, see [llms.txt](https://mamba-dongdong.gitbook.io/pc-im/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mamba-dongdong.gitbook.io/pc-im/shang-pin/shang-pin-zhan-shi.md).

# 商品展示

此文档，介绍PC IM端正确展示商品信息。

![聊天框展示商品信息](https://282911269-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LqzbYBBheC1K-0TNJCp%2F-Lr7qbz688jVckt93TBE%2F-Lr7rFAuP6QUrvtOCGxl%2FA%20%E9%A6%96%E9%A1%B5%20%E8%AE%BE%E7%BD%AE%20%E5%95%86%E5%93%81.png?alt=media\&token=3ee44c36-6baa-48a5-9b22-47ef06bc96ac)

&#x20;前提：目前用户可以通过App端IM发送自定义商品信息，而PC IM没有进行适配展示，所以显示为“自定义消息”。

&#x20;期望：PC IM进行适配展示，展示效果参考图中“俄罗斯套娃”商品。

&#x20;自定义商品消息如下：

```
{
    customizeMessageType = goods;
    goodsId = 5297;
    goodsType = 20;
    pic = "http://imgs.shougongker.com/shop/18731882/c2cMall/1565687129/1565687130_0.jpg@!iw540";
    price = "133.00";
    title = "牛皮手拿包";
}
```

| 字段名                  | 类型     | 详细描述    | 说明                                                                                                                                                                                                   |
| -------------------- | ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customizeMessageType | string | 自定义消息类型 | goods 代表是商品类型                                                                                                                                                                                        |
| goodsId              | int    | 商品ID    | <p>用于跳转到商品详情</p><p>B2C商品跳转链接：<a href="http://h5.shougongker.com/commodity_details.html?good_id=3372"><http://h5.shougongker.com/commodity_details.html?good_id=></a>goodsId</p><p>C2C商品跳转链接：暂不跳转</p> |
| goodsType            | int    | 商品类型    | <p>10 代表B2C商品</p><p>20 代表C2C商品</p>                                                                                                                                                                   |
| pic                  | string | 商品封面图   |                                                                                                                                                                                                      |
| price                | string | 商品价格    |                                                                                                                                                                                                      |
| title                | string | 商品名称    |                                                                                                                                                                                                      |
