企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 文档接口(Archives) ## 文档列表接口\[index\]【免登录】 可根据模型或栏目调用对应文档列表 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/index ### 请求方法 GET ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | model | number | 否 | 模型id | 1 | | channel | number | 否 | 栏目id | 1 | | page | number | 否 | 分页页码 | 1 | | orderby | string | 否 | 排序 | createtime ,weigh | | addon | string | 否 | 自定义字段,`addon`需要配合`channel`或`model`调用才会生效 | author,content | | filter\["os"\] | string array | 否 | 搜索过滤,需配合`model`或`chanel`使用 | windows | > channel=-1&model=-1 对于首页,应用初始化,无法给传参,默认传-1,取导航的设置参数 > 如使用搜索过滤filter,如搜索副表字段,务必在后台模型管理->字段管理中启用对应字段的过滤,同时filter需要配合channel或model参数才启作用。 ### 返回值 ~~~css { "code": 1, "msg": "", "time": "1616637682", "data": { "archivesList": [ { "id": 34, "user_id": 0, "channel_id": 6, "channel_ids": "", "model_id": 1, "special_ids": "", "admin_id": 2, "title": "Leap Motion AR头显看起来很疯狂但可能是奇迹", "flag": "top", "style": "", "image": "https://cdn.fastadmin.net/uploads/2018/20180416/5ad44129495250.jpg", "images": "https://cdn.fastadmin.net/uploads/2018/20180416/5ad44129495250.jpg", "seotitle": "", "keywords": "", "description": "本周我们正在研究Leap Motion为增强现实带来的新东西。我们已经看到他们之前创造了一些令人难以置信的技术,尤其是当涉及到运动跟踪和控制时。现在看起来他们认为他们是以面向优先的方式进入AR增强现实世界。", "tags": "AR,互联网", "views": 7150, "comments": 9, "likes": 71, "dislikes": 0, "diyname": "", "isguest": 1, "iscomment": 1, "createtime": 1600510278, "updatetime": 1615881894, "publishtime": 1523894400, "channel": { "id": 6, "parent_id": 1, "name": "硬件", "image": "/assets/addons/cms/img/noimage.jpg", "diyname": "hardware", "items": 8, "url": "/cms/hardware.html", "fullurl": "http://www.fa.com/cms/hardware.html" }, "url": "http://www.fa.com/cms/hardware/34.html", "fullurl": "http://www.fa.com/cms/hardware/34.html", "likeratio": 100, "taglist": [ { "name": "AR", "url": "/cms/t/AR.html" }, { "name": "互联网", "url": "/cms/t/互联网.html" } ], "create_date": "6月前", "images_list": [ "https://cdn.fastadmin.net/uploads/2018/20180416/5ad44129495250.jpg", "https://cdn.fastadmin.net/uploads/2018/20180416/5ad44129bb3621.png" ] } ] } } ~~~ ## 文档详情接口\[detail\]【免登录】 根据自定义名称或文档主键id获取文档详情 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/detail ### 请求方法 GET ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | diyname | string | 是 | 文档自定义名称 | diytitle | | id | number | 是 | 文档id | 1 | > 若有`diyname`优先使用`diyname` ### 返回值 ~~~json { "code": 1, "msg": "", "time": "1616638575", "data": { "archivesInfo": { "id": 34, "user_id": 0, "channel_id": 6, "channel_ids": "", "model_id": 1, "special_ids": "", "admin_id": 2, "title": "Leap Motion AR头显看起来很疯狂但可能是奇迹", "flag": "top", "style": "", "image": "https://cdn.fastadmin.net/uploads/2018/20180416/5ad44129495250.jpg", "images": "https://cdn.fastadmin.net/uploads/2018/20180416/5ad44129495250.jpg,https://cdn.fastadmin.net/uploads/2018/20180416/5ad44129bb3621.png", "seotitle": "", "keywords": "", "description": "本周我们正在研究Leap Motion为增强现实带来的新东西。", "tags": "AR,互联网", "weigh": 9999, "views": 7151, "comments": 9, "likes": 71, "dislikes": 0, "diyname": "", "isguest": 1, "iscomment": 1, "createtime": 1600510278, "updatetime": 1615881894, "publishtime": 1523894400, "deletetime": null, "memo": "", "status": "normal", "content": "<p>本周我们正在研究Leap Motion为增强现实带来的新东西。</p>", "author": "Leap", "number": 45, "price": 1, "liebiao_text": "title1", "liechech_text": "", "shuzu_text": "[]", "duoguanlian_text": "", "guanlradio_text": "", "checkbox_text": "value3,value4", "radio_text": "title1", "ispaid": true, "user": null, "channel": { "id": 6, "type": "list", "model_id": 1, "parent_id": 1, "name": "硬件", "image": "/assets/addons/cms/img/noimage.jpg", "flag": "recommend", "seotitle": "", "keywords": "", "description": "", "diyname": "hardware", "outlink": "", "items": 8, "weigh": 0, "channeltpl": "channel.html", "listtpl": "list_news.html", "showtpl": "show_news.html", "pagesize": 10, "vip": 2, "listtype": 0, "iscontribute": 1, "isnav": 1, "createtime": 1523717893, "updatetime": 1615881503, "status": "normal", "url": "/cms/hardware.html", "fullurl": "http://www.fa.com/cms/hardware.html" }, "url": "/cms/hardware/34.html", "fullurl": "http://www.fa.com/cms/hardware/34.html", "likeratio": 100, "taglist": [ { "name": "AR", "url": "/cms/t/AR.html" }, { "name": "互联网", "url": "/cms/t/互联网.html" } ], "create_date": "6月前" }, "commentList": [ { "id": 40, "user_id": 24, "pid": 0, "content": "kkkkkkk", "comments": 0, "createtime": 1598925369, "user": { "id": 24, "nickname": "昵称", "avatar": "", "bio": "r撒旦法", "email": "123@qq.com", "url": "/u/24" }, "create_date": "6月前" }, { "id": 37, "user_id": 24, "pid": 0, "content": "sdddd", "comments": 0, "createtime": 1598925307, "user": { "id": 24, "nickname": "昵称", "avatar": "", "bio": "法", "email": "123@qq.com", "url": "/u/24" }, "create_date": "6月前" }, { "id": 1, "user_id": 1, "pid": 0, "content": "看起来的确很疯狂,很值得一试。。", "comments": 0, "createtime": 1553763251, "user": { "id": 1, "nickname": "admin", "avatar": "", "bio": "", "email": "admin@163.com", "url": "/u/1" }, "create_date": "1年前" } ], "__token__": "53bee53f2e96648a1e74ab459a13808d" } } ~~~ ## 文档赞与踩接口\[vote\]【需登录】 赞与踩 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/vote ### 请求方法 GET ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | type | string | 否 | like为赞,为空则是踩 | like | | id | number | 是 | 文档id | 1 | ### 返回值 ~~~css { "code": 1, "msg": "点赞成功!", "time": "1616638965", "data": { "likes": 5, "dislikes": 0, "likeratio": 100 } } ~~~ ## 提交订单接口\[order\]【需登录】 提交订单接口 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/order ### 请求方法 POST ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | id | number | 是 | 文档id | 1 | | paytype | string | 是 | 支付类型 | wechat,alipay | | method | string | 是 | 支付方法 | mp,miniapp,wap | | returnurl | string | 是 | h5支付回调地址 | h5 | ### 返回值 ~~~css { "code": 1, "msg": "请求成功", "time": "1616640103", "data": { "appId": "wx8d78sdfd601b", "timeStamp": "1616640103", "nonceStr": "aTHOXaJBZ5La18Xq", "package": "prepay_id=wx2sdf456sdf46sd5f44adcd30000", "signType": "MD5", "paySign": "0E5CD493s6d4fs6d4f498CE05FF12D677F" } } ~~~ ## 获取栏目接口\[get\_channel\]【免登录】 获取栏目接口,一般用于发布文章时调用 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/get\_channel ### 请求方法 GET ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | archives\_id | number | 否 | 文档id | 1 | ### 返回值 ~~~json { "code": 1, "msg": "", "time": "1616640238", "data": { "channel": [ { "id": 1, "parent_id": 0, "name": " 新闻中心", "model_id": 1, "diyname": "news", "type": "list", "url": "/cms/news.html", "fullurl": "http://www.fa.com/cms/news.html", "spacer": "", "haschild": 1, "disabled": false }, { "id": 6, "parent_id": 1, "name": "&nbsp;├ 硬件", "model_id": 1, "diyname": "hardware", "type": "list", "url": "/cms/hardware.html", "fullurl": "http://www.fa.com/cms/hardware.html", "spacer": "&nbsp;├", "haschild": 1, "disabled": false }, { "id": 25, "parent_id": 6, "name": "&nbsp;│&nbsp;├ 小硬件", "model_id": 1, "diyname": "xiaoyingjian", "type": "list", "url": "/cms/xiaoyingjian.html", "fullurl": "http://www.fa.com/cms/xiaoyingjian.html", "spacer": "&nbsp;│&nbsp;├", "haschild": 0, "disabled": false }, { "id": 24, "parent_id": 6, "name": "&nbsp;│&nbsp;└ 三级栏目", "model_id": 1, "diyname": "sanjilanmu", "type": "list", "url": "/cms/sanjilanmu.html", "fullurl": "http://www.fa.com/cms/sanjilanmu.html", "spacer": "&nbsp;│&nbsp;└", "haschild": 0, "disabled": false } ], "channel_id": 0 } } ~~~ ## 获取栏目字段列表接口\[get\_channel\_fields\]【需登录】 获取栏目字段列表,一般用于发布文章 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/get\_channel\_fields ### 请求方法 GET ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | channel\_id | number | 是 | 栏目id | 1 | | archives\_id | number | 是 | 文档id,编辑文档时传 | 1 | ### 返回值 ~~~json { "code": 1, "msg": "", "time": "1616640806", "data": { "contributefields": [ "content", "channel_ids", "image", "images", "tags", "description", "keywords" ], "fields": [ { "id": 7, "source": "model", "source_id": 1, "name": "wenben", "type": "text", "title": "文本", "content": "value1|title1\r\nvalue2|title2", "defaultvalue": "文本", "rule": "password", "msg": "错误消息", "ok": "成功消息", "tip": "提示消息", "decimals": 2, "length": 10, "minimum": 0, "maximum": 0, "extend": "", "setting": { "table": "", "conditions": "", "key": "", "value": "" }, "weigh": 140, "createtime": 1508992093, "updatetime": 1604027980, "isorder": 0, "iscontribute": 1, "isfilter": 0, "status": "normal", "value": "文本", "content_list": "value1|title1\r\nvalue2|title2", "isrequire": false }, { "id": 5, "source": "model", "source_id": 1, "name": "author", "type": "string", "title": "字符", "content": "value1|title1\r\nvalue2|title2", "defaultvalue": "字符", "rule": "required", "msg": "", "ok": "", "tip": "", "decimals": 0, "length": 50, "minimum": 0, "maximum": 0, "extend": "", "setting": { "table": "", "conditions": "", "key": "", "value": "" }, "weigh": 136, "createtime": 1508990735, "updatetime": 1603851175, "isorder": 0, "iscontribute": 1, "isfilter": 0, "status": "normal", "value": "字符", "content_list": "value1|title1\r\nvalue2|title2", "isrequire": true }, { "id": 72, "source": "model", "source_id": 1, "name": "price", "type": "number", "title": "价格", "content": "value1|title1\r\nvalue2|title2", "defaultvalue": "", "rule": "", "msg": "", "ok": "", "tip": "", "decimals": 0, "length": 255, "minimum": 0, "maximum": 0, "extend": "", "setting": { "table": "", "conditions": "", "key": "", "value": "" }, "weigh": 72, "createtime": 1615771150, "updatetime": 1615771160, "isorder": 0, "iscontribute": 1, "isfilter": 0, "status": "normal", "value": "", "content_list": "value1|title1\r\nvalue2|title2", "isrequire": false } ], "values": [], "archives": null, "secondList": [ { "id": 1, "parent_id": 0, "name": " 新闻中心", "model_id": 1, "diyname": "news", "type": "list", "url": "/cms/news.html", "fullurl": "http://www.fa.com/cms/news.html", "spacer": "", "haschild": 1, "disabled": false }, { "id": 6, "parent_id": 1, "name": "&nbsp;├ 硬件", "model_id": 1, "diyname": "hardware", "type": "list", "url": "/cms/hardware.html", "fullurl": "http://www.fa.com/cms/hardware.html", "spacer": "&nbsp;├", "haschild": 1, "disabled": false } ] } } ~~~ ## 提交数据接口\[archives\_post\]【需登录】 提交数据,发布文档 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/archives\_post ### 请求方法 POST ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | {} | object | 是 | 对象参数提交 | {title:"标题",author:"字符",number:"78",price:8} | #### 参数列表 | **Body参数名** | 类型 | 必需 | 描述 | 示例 | | --- | --- | --- | --- | --- | | title | string | 是 | 标题 | 标题 | | tags | string | 是 | 标签,Test,自定义 | a,b,c | | content | string | 是 | 内容,支持HTML | 测试内容 | | channel\_id | string | 是 | 栏目ID | 1 | | channel\_ids | string | 是 | 副栏目ID集合 | 2,3 | | price | string | 是 | 文档价格 | 0 | | image | string | 否 | 文档图片 | /uploads/demo.png | | 副表字段1 | string | 否 | 副表字段名称,副表字段必须和栏目的模型字段相匹配 | author | | 副表字段n | string | 否 | 副表字段名称,副表字段必须和栏目的模型字段相匹配 | author | ### 返回值 ~~~json { "code": 1, "msg": "提交成功!请等待审核!", "time": "1616641108", "data": null } ~~~ ## 我发布的文档接口\[my\]【需登录】 查询我发布的文档接口 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/my ### 请求方法 GET ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | model\_id | number | 否 | 模型id | 1 | | channel\_id | number | 否 | 栏目id | 1 | | page | number | 否 | 分页页码 | 1 | ### 返回值 ~~~json { "code": 1, "msg": "", "time": "1616728511", "data": { "archivesList": { "total": 2, "per_page": 10, "current_page": 1, "last_page": 1, "data": [ { "id": 42, "user_id": 2, "channel_id": 12, "channel_ids": "", "model_id": 3, "special_ids": "", "admin_id": 0, "title": "Secret Folder Pro 9.7 文件夹加密", "flag": "", "style": "", "image": "https://cdn.demo.fastadmin.net/uploads/2019/20190325/7bd6c9363e0a717e70920016838d4095.png", "images": "", "seotitle": "", "keywords": "", "description": "Secret Folder能够帮助你隐藏文件夹和其内容。如果你有私密和敏感信息不想被被人看到、修改和删除,那么只要轻松的点击几下鼠标,再输入密码就完全可以办到了。", "tags": "安全", "weigh": 0, "views": 1768, "comments": 1, "likes": 235, "dislikes": 0, "diyname": "", "isguest": 1, "iscomment": 1, "createtime": 1600500977, "updatetime": 1600500977, "publishtime": 1553443200, "deletetime": null, "memo": "", "status": "normal", "url": "/cms/app/42.html", "fullurl": "http://www.fa.com/cms/app/42.html", "likeratio": 100, "taglist": [ { "name": "安全", "url": "/cms/t/安全.html" } ], "create_date": "6月前" } ] }, "channelList": [ { "id": 12, "type": "list", "model_id": 3, "parent_id": 11, "name": "应用软件", "image": "/assets/addons/cms/img/noimage.jpg", "flag": "", "seotitle": "", "keywords": "", "description": "", "diyname": "app", "outlink": "", "items": 17, "weigh": 0, "channeltpl": "channel.html", "listtpl": "list_download.html", "showtpl": "show_download.html", "pagesize": 10, "vip": 0, "listtype": 0, "iscontribute": 1, "isnav": 1, "createtime": 1553508581, "updatetime": 1553934383, "status": "normal", "url": "/cms/app.html", "fullurl": "http://www.fa.com/cms/app.html" } ] } } ~~~ ## 删除我发布的文档接口\[delete\]【需登录】 删除我发布的文档接口 ### 请求URL http://www.yoursite.com/addons/cms/api.archives/delete ### 请求方法 POST ### 请求参数 | Body参数名 | 类型 | 必需 | 描述 | 示例 e.g. | | --- | --- | --- | --- | --- | | id | number | 是 | 文档id | 1 | ### 返回值 ~~~json { "code": 1, "msg": "删除文档成功", "time": "1616640103", "data": null } ~~~