简要描述:

  • 抖音cps-获取商品海报 这里我是把aggregate_module_code和mig一样当参数拼的如果需要调整联系我
  • 例子链接http://shop/addons/yun_shop/?menu#/TikTokDetail/?mid=1&aggregate_module_code=2&i=2
  • 小程序原基础上增加aggregate_module_code 格式为商品id,用户id,aggregate_module_code
  • 小程序海报时如果不是抖音平台 商品id使用海报参数id 在小程序中请求获取海报参数API获取参数(原因是商品id过长 超过小程序参数要求)

请求URL:

GET/route=plugin.tiktok-cps.api.poster.get-poster
参数名 类型 说明 是否必须
id string 第三方商品id
aggregate_module_code int 平台类型 1抖音2淘宝3京东4拼多多5唯品会 不传默认1
cover_url string 选择的图片
cos_amount float 佣金 否 淘宝需要把列表的佣金带过来 淘宝详情不返回佣金
cos_ratio float 佣金比例 否 淘宝需要把列表的佣金带过来 淘宝详情不返回佣金
text string 淘宝商品数据 否 淘宝必须

返回示例:

没开启新海报插件时返回:

{
    "result": 1,
    "msg": "请求接口成功",
    "data": {
        "logo": "http://119.91.205.224/static/upload/images/15/2022/09/510520746843faf1408faa2e34a33888.png",
        "shopName": "果果阿成旗舰店",
        "thumb": "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/v1_HzLSoted_71168835081404746390575_e088ddeb079ab9c8e212dd283005c0bc_sx_239125_www800-800",
        "price": 510,
        "market_price": 0,
        "shareTitle": "【主播宠粉】(80抽大包一包一斤多)婴儿湿巾纸手口屁专用湿纸巾",
        "backgroundImg": "http://119.91.205.224/static/post/images/post.png",
        "qrcode": "http://119.91.205.224/storage/app/public/goods/qrcode/15/shop-mid-165006-goods-.png",
        "new": false
    }
}

打开新海报插件时返回:

{
    "result": 1,
    "msg": "ok",
    "data": {
        "poster_data": [
            {
                "width": 200,
                "height": 200,
                "top": 6,
                "left": 224,
                "type": "img",
                "size": 0,
                "src": "https://p3-aio.ecombdimg.com/obj/ecom-shop-material/RYrWWpaL_m_05a45313e66a6d4f55adeddb35718298_sx_1746225_www1080-1080"
            },
            {
                "color": "#000",
                "size": 28,
                "bold": 0,
                "italic": 0,
                "slide": 0,
                "under": 0,
                "width": 400,
                "height": 80,
                "top": 302,
                "left": 18,
                "type": "title",
                "src": "名美人  深海鱼子酱动感眼霜   50g/瓶  (冰姐)"
            },
            {
                "src": "https://dev15.yunzmall.com/static/upload/newimage/9678b176fb65f84bab105edc8afaadf8.jpg",
                "src_url": "https://dev15.yunzmall.com/static/upload/newimage/9678b176fb65f84bab105edc8afaadf8.jpg",
                "width": 200,
                "height": 200,
                "top": 436,
                "left": 10,
                "type": "other_img",
                "size": 0
            },
            {
                "color": "#000",
                "size": 28,
                "bold": 0,
                "italic": 0,
                "slide": 0,
                "under": 0,
                "width": 400,
                "height": 80,
                "top": 690,
                "left": 28,
                "type": "member_price",
                "src": 0
            },
            {
                "color": "#000",
                "size": 28,
                "bold": 0,
                "italic": 0,
                "slide": 0,
                "under": 0,
                "width": 400,
                "height": 80,
                "top": 756,
                "left": 22,
                "type": "market_price",
                "src": 0
            },
            {
                "color": "#000",
                "size": 28,
                "bold": 0,
                "italic": 0,
                "slide": 0,
                "under": 0,
                "width": 400,
                "height": 80,
                "top": 814,
                "left": 18,
                "type": "price",
                "src": 999999900
            },
            {
                "width": 200,
                "height": 200,
                "top": 400,
                "left": 414,
                "type": "qr",
                "size": 0,
                "src": "https://dev15.yunzmall.com/storage/app/public/goods/qrcode/25/shop-mid-164912-goods-.png"
            },
            {
                "width": 106,
                "height": 106,
                "top": 28,
                "left": 498,
                "type": "head",
                "size": 0,
                "src": "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/image/da23447829d3d959bd713df8e82294e7.jpg"
            },
            {
                "color": "#847C7C",
                "size": 40,
                "width": 200,
                "height": 80,
                "top": 792,
                "left": 418,
                "type": "nickname",
                "src": "18*******29"
            },
            {
                "src": "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/images/25/2022/08/e3d906a37828141d449b59c18a3d5648.png",
                "src_url": "",
                "logo_type": 0,
                "width": 200,
                "height": 200,
                "top": 0,
                "left": 2,
                "type": "logo",
                "size": 0
            }
        ],
        "background": {
            "type": "color",
            "src": "#F9C960"
        },
        "new": true
    }
}

没开启新海报返回参数说明:

参数名 类型 说明
参数名 类型 说明
logo string logo地址
shopName string 商城名称
thumb string 商品图片
price int 现价
market_price int 原价
shareTitle string 商品名称
backgroundImg string 海报地址
qrcode string 二维码地址

打开新海报返回参数说明:

参数名 类型 说明
参数名 类型 说明
logo string logo地址
img string 商城主图
title string 商品名称
other_img string 其它图片
price int 现价
market_price int 原价
member_price int 会员价
head string 头像
nickname string 会员昵称
qr string 二维码地址