简要描述:

  • 后台获取微信图文接口

请求域名:

  • http://xx.com

请求URL:

POST:route=plugin.wechat.admin.material.controller.news.get-wechat-news

参数:

参数名 是否必须 类型 说明
page int 分页 - 页码

返回示例:

正确时返回:

[
    {
        "id": 8, 
        "acid": 2, 
        "filename": "", 
        "attachment": "", 
        "media_id": "", 
        "type": "news", 
        "model": "local", 
        "tag": "", 
        "createtime": 1540430976, 
        "has_many_wechat_news": [
            {
                "id": 7, 
                "attach_id": 8, 
                "thumb_media_id": "", 
                "thumb_url": "", 
                "title": "EXO", 
                "author": "EXO", 
                "digest": "", 
                "content": "<p><br/></p><p><img src=\"https://dev5.yunzshop.com/attachment/images/2/2018/10/J9ILam62tFm2Us1a1MuM58TLlf376t.jpg\" width=\"100%\" style=\"\"/></p><p><br/></p>", 
                "content_source_url": "", 
                "show_cover_pic": 0, 
                "url": "", 
                "displayorder": 0, 
                "need_open_comment": 0, 
                "only_fans_can_comment": 0
            }
        ]
    },
    {
        "id": 14, 
        "acid": 2, 
        "filename": "", 
        "attachment": "", 
        "media_id": "", 
        "type": "news", 
        "model": "local", 
        "tag": "", 
        "createtime": 1551152543, 
        "has_many_wechat_news": [
            {
                "id": 19, 
                "attach_id": 14, 
                "thumb_media_id": "", 
                "thumb_url": "http://www.yz.com/attachment/images/2/2019/02/zVVZ1Wq28qh1zIpHVooeoPBz9b9p9I.jpg", 
                "title": "标题2", 
                "author": "作者2", 
                "digest": "", 
                "content": "<p>内容2</p>", 
                "content_source_url": "http://www.yz.com/web/index.php?c=platform&a=material-post&do=news&newsid=14", 
                "show_cover_pic": 0, 
                "url": "", 
                "displayorder": 1, 
                "need_open_comment": 0, 
                "only_fans_can_comment": 0
            }, 
            {
                "id": 18, 
                "attach_id": 14, 
                "thumb_media_id": "", 
                "thumb_url": "http://www.yz.com/attachment/images/2/2019/02/r53P6p3u8BzO7308UP8888ub87U8pQ.jpg", 
                "title": "好好好标题", 
                "author": "好好好作者", 
                "digest": "", 
                "content": "<p>好好好内容<br/></p>", 
                "content_source_url": "http://www.yz.com/web/index.php?c=platform&a=material-post&&new_type=reply", 
                "show_cover_pic": 0, 
                "url": "", 
                "displayorder": 0, 
                "need_open_comment": 0, 
                "only_fans_can_comment": 0
            }
        ]
    }
]

返回参数说明:

参数名 类型 说明
id int 素材id
type string 素材类型
model string 存储方式:local,perm local表示存储在服务器,perm表示存储在微信
createtime int时间戳 创建时间
has_many_wechat_news array 素材中有多个图文
has_many_wechat_news参数名 类型 说明
id int 图文id
attach_id int 所属素材id
thumb_media_id string 微信的mediaId
thumb_url string 缩略图url
title string 标题
author string 作者
content text 内容
digest string 图文消息的摘要,仅有单图文消息才有摘要,多图文此处为空
content_source_url string 图文消息的原文地址,即点击“阅读原文”后的URL
show_cover_pic string 是否显示封面,0为false,即不显示,1为true,即显示
title string 标题

备注:

  • 更多返回错误代码请看首页的错误代码描述