简要描述:

  • 话术库侧边栏-获取素材列表

请求域名:

  • http://xx.com

请求URL:

plugin.speechcraft-library.frontend.controller.member.Material.getGroupMaterialList

参数:

参数名 是否必须 类型 说明
group_id int 分组id,不传则获取权限范围内的全部素材
search[material_name] stirng 素材名称

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "成功",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 13,
                "material_name": "测试素材3关键字",
                "content_list": [
                    {
                        "id": 1,
                        "content": {
                            "type": "text",
                            "news": "测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本<span contenteditable=\"false\" style=\"color: rgb(41, 186, 156); margin: 0px 5px;\">客户昵称</span>"
                        }
                    },
                    {
                        "id": 2,
                        "content": {
                            "type": "image",
                            "link_img": "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/images/25/2022/08/haibianrichu_6697627.jpg"
                        }
                    },
                    {
                        "id": 3,
                        "content": {
                            "type": "link",
                            "title": "我是一个链接",
                            "link": "www.baidu.com",
                            "describe": "我是一个描述",
                            "link_img": "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/images/25/2022/08/src=http___www.lgzgh.org_uploads_allimg_191111_14345914H_0.jpg&refer=http___www.lgzgh.png"
                        }
                    },
                    {
                        "id": 4,
                        "content": {
                            "type": "video",
                            "link_video": "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/videos/25/2022/08/96912aad5ca7dd5256a0d69a07699432.mp4"
                        }
                    },
                    {
                        "id": 5,
                        "content": {
                            "type": "applet",
                            "title": "我是一个小程序",
                            "appid": "dsadwad1515r2dc",
                            "page": "/pata/index",
                            "link_img": "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/images/25/2022/08/haibianrichu_6697627.jpg"
                        }
                    },
                    {
                        "id": 6,
                        "content": {
                            "type": "file",
                            "link_file": "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/files/25/2022/08/芸众爆客码操作文档.docx"
                        }
                    }
                ]
            },
            {
                "id": 14,
                "material_name": "测试素材1",
                "content_list": [
                    {
                        "id": 7,
                        "content": {
                            "type": "image",
                            "link_img": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/25/2022/02/12406a7f0162f026b54e5fee53a3f5aa.jpg"
                        }
                    },
                    {
                        "id": 8,
                        "content": {
                            "type": "text",
                            "news": "感谢您<span contenteditable=\"false\" style=\"color: rgb(41, 186, 156); margin: 0px 5px;\">客户昵称</span>的关注,我们将<div>竭诚为您服务!<div>得瑟</div><div>得瑟</div><div>地方v的风格</div><div>感到翻跟斗</div><div>324</div><div>324</div><div>各方观点和</div></div>"
                        }
                    }
                ]
            }
        ],
        "first_page_url": "http://yzhonshop.com/addons/yun_shop/api.php?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://yzhonshop.com/addons/yun_shop/api.php?page=1",
        "next_page_url": null,
        "path": "http://yzhonshop.com/addons/yun_shop/api.php",
        "per_page": 15,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    }
}

返回参数说明:

参数名 类型 说明
id int 素材id
material_name string 素材名称
content_list array 如下

content_list[]:

参数名 类型 说明
id int 素材内容id
type string 类型
content array 素材内容

任务内容content

[
	{
		'type' : 'text'
		'news' : '文本消息'
	}
	{
		'type' : 'image'
		'link_img':'图片地址'
	}
	{
		'type' : 'link'
		'title' : '链接标题',
		'link' : '链接地址',
		'describe' : '链接描述',
		'link_img' : '链接封面'
	}
	{
		'type' : 'applet'
		'title' : '小程序标题',
		'appid' : '小程序appid',
		'page' : '小程序page路径',
		'link_img' : '小程序封面',
	}
	{
		'type' : 'video'
		'link_video' : '视频地址'
	}
	{
		'type' : 'file'
		'link_file' : '文件地址'
	}
]

错误时返回:

{
	"result": 0,
	"msg": "您没有权限查看此分组的素材!",
	"data": []
}