基本API与微信小程序基本一致,只是请求地址变更 `/bdapp/`
### 获取小程序配置信息
> 每个微信小程序对应的栏目信息可能不一样,这个是例子
~~~[api]
get:/v1/bdapp/config.html
<<<
success
{
"status": 1,
"error_code": 0,
"data": {
"contrast": {
"cat": {
"product": {
"catid": "1",
"catname": "国内新闻"
},
"news": {
"catid": "7",
"catname": "美国"
},
"case": {
"catid": "9",
"catname": "英国"
}
},
"page": {
"about": {
"catid": "4",
"catname": "联系方式"
},
"contact": {
"catid": "10",
"catname": "我是单页"
}
}
},
"site": {
"site_id": 1,
"status": 1,
"name": "",
"logo": "",
"info": "",
"beian": "",
"contact_people": "",
"contact_address": "",
"contact_phone": "1332258082715",
"contact_wx": "",
"top_banners": ""
},
"extend": {
"banners1": "http://file.1lwl.cn/d/2017/08/59a508e53a7f4.png",
"banners2": "",
"banners3": ""
}
},
"msg": "",
"returns_time": 1505027176
}
<<<
error
~~~
### banners图获取
~~~[api]
get:/v1/bdapp/banners.html
<<<
success
{
"status": 1,
"error_code": 0,
"data": [
{
"title": "banners1",
"picurl": "https://ffsm.d1xz.net/statics/ffsm/index/1/images/topbanner.gif",
"url": "http://www.baidu.com",
"description": "这是一个banners1"
},
{
"title": "banners2",
"picurl": "https://ffsm.d1xz.net/statics/ffsm/bazijingpi/3/images/bzzy_banner.jpg",
"url": "",
"description": "这是一个banners2"
},
{
"title": "banners3",
"picurl": "https://ffsm.d1xz.net/statics/ffsm/bazihehun/1/images/img_banner.jpg",
"url": "",
"description": "这是一个banners3"
}
],
"msg": "",
"returns_time": 1502780279
}
<<<
error
~~~
### 获取站点信息
~~~[api]
get:/v1/bdapp/site.html
<<<
success
{
"status": 1,
"error_code": 0,
"data": {
"id": 1,
"uid": 1,
"status": 1,
"off_access": 0,
"name": "测试站点33",
"logo": "",
"ico": "",
"domain": "dev.shuipf.com|aaadd.com",
"seo_title": "",
"keywords": "测试",
"info": "5测试站点12",
"beian": "",
"contact_people": "",
"contact_address": "",
"contact_phone": "",
"theme_id": 1,
"index_template_id": 1,
"index_wap_template_id": 0,
"is_wap": 1,
"is_search": 1,
"is_guestbook": 0,
"is_links": 0,
"expire_time": 1530858641,
"admin_uid": 1,
"company_id": 1,
"total_fee": 4000,
"create_time": 0,
"update_time": 1496730641
},
"msg": "",
"returns_time": 1502780336
}
<<<
error
~~~
### 获取栏目信息(普通栏目)
~~~[api]
get:/v1/bdapp/cat.html
*int:catid=0#栏目ID
<<<
success
{
"status": 1,
"error_code": 0,
"data": {
"catid": 1,
"bcatid": 1,
"siteid": 1,
"type": 0,
"modelid": 2,
"catname": "国内新闻",
"letter": "guoneixinwen",
"domain": "",
"parentid": 2,
"arrparentid": "0,2",
"child": 1,
"arrchildid": "1,8",
"image": "",
"description": "",
"parentdir": "",
"catdir": "china",
"url": "/cat/1.html",
"hits": 0,
"setting": {
"listoffmoving": "0",
"showoffmoving": "0",
"seturl": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"template_channel": "3",
"template_list": "2",
"template_show": "4",
"template_wap_channel": "40",
"template_wap_list": "39",
"template_wap_show": "41"
},
"isshow": 1,
"listorder": 0,
"extend": []
},
"msg": "",
"returns_time": 1502780399
}
<<<
error
~~~
### 获取栏目信息(单页栏目)
~~~[api]
get:/v1/bdapp/cat.html
*int:catid=0#栏目ID
<<<
success
{
"status": 1,
"error_code": 0,
"data": {
//单页内容
"page": {
"catid": 4,
"title": "啊啊啊333",
"style": "",
"keywords": "的",
"content": "<p>水电费的所发生的士大夫大师傅似的2222</p><p>sdfsdfsdfdsfs儿童热帖333</p>",
"template": "",
"create_time": 1461314871,
"update_time": 1486539428
},
//栏目信息
"cat": {
"catid": 4,
"bcatid": 4,
"siteid": 1,
"type": 1,
"modelid": 0,
"catname": "联系方式",
"letter": "lianxifangshi",
"domain": "",
"parentid": 3,
"arrparentid": "0,3",
"child": 0,
"arrchildid": "4",
"image": "",
"description": "",
"parentdir": "",
"catdir": "contact",
"url": "/cat/4.html",
"hits": 0,
"setting": {
"listoffmoving": "0",
"showoffmoving": "0",
"seturl": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"template_list": "5",
"template_wap_list": "38",
"template_channel": 0,
"template_show": 0,
"template_wap_channel": 0,
"template_wap_show": 0
},
"isshow": 1,
"listorder": 0,
"extend": []
}
},
"msg": "",
"returns_time": 1502865332
}
<<<
error
~~~
### 获取栏目列表
~~~[api]
get:/v1/bdapp/category.html
int:catid=0#父级栏目bcatid
int:limit=0#数量
int:page=1#分页ID
<<<
success
{
"status": 1,
"error_code": 0,
"data": {
"total": 7,
"page": 1,
"size": "2",
"list": [
{
"catid": 4240,
"bcatid": 11,
"siteid": 41,
"type": 0,
"modelid": 2,
"catname": "阿特兹",
"letter": "atezi",
"domain": "",
"parentid": 4236,
"arrparentid": "0,4236",
"child": 0,
"arrchildid": "4240",
"image": "",
"description": "",
"parentdir": "",
"catdir": "b",
"url": "http://www.jxxsycd.com/cat/11.html",
"hits": 0,
"setting": {
"listoffmoving": "0",
"showoffmoving": "0",
"seturl": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"template_channel": "792",
"template_list": "791",
"template_show": "793",
"template_wap_channel": "800",
"template_wap_list": "799",
"template_wap_show": "801"
},
"isshow": 1,
"listorder": 15
},
{
"catid": 4241,
"bcatid": 12,
"siteid": 41,
"type": 0,
"modelid": 2,
"catname": "野马",
"letter": "yema",
"domain": "",
"parentid": 4236,
"arrparentid": "0,4236",
"child": 0,
"arrchildid": "4241",
"image": "",
"description": "",
"parentdir": "",
"catdir": "bz",
"url": "http://www.jxxsycd.com/cat/12.html",
"hits": 0,
"setting": {
"listoffmoving": "0",
"showoffmoving": "0",
"seturl": "",
"meta_title": "",
"meta_keywords": "",
"meta_description": "",
"template_channel": "792",
"template_list": "791",
"template_show": "793",
"template_wap_channel": "800",
"template_wap_list": "799",
"template_wap_show": "801"
},
"isshow": 1,
"listorder": 14
}
]
},
"msg": "",
"returns_time": 1503630853
}
<<<
error
~~~
### 获取信息内容
~~~[api]
get:/v1/bdapp/show.html
*int:id=0#信息ID
*int:catid=0#栏目ID
int:page=1#分页ID
<<<
success
{
"status": 1,
"error_code": 0,
"data": {
"seo": {
"title": "sdfdsf 333333_福建_Shuipf内容管理系统 V3",
"keywords": "",
"description": "fdsfds"
},
"info": {
"catid": 8,
"title": "sdfdsf 333333",
"style": "",
"thumb": "",
"keywords": "",
"tags": "",
"description": "fdsfds",
"content": "<p>fdsfdsfds</p>",
"relation": "",
"uid": 1,
"islink": 0,
"username": "水平凡",
"inputtime": "2016-07-08 17:02:51",
"updatetime": "2016-07-08 17:02:47",
"views": 7,
"listorder": 0,
"posid": 0,
"status": "审核通过",
"id": 1133,
"isthumb": 0,
"url": "/show/8-1133.html",
"sysadd": 1,
"yesterdayviews": 1,
"dayviews": 1,
"weekviews": 1,
"monthviews": 1,
"viewsupdatetime": 1477897263,
"_original": {
"catid": 8,
"title": "sdfdsf 333333",
"style": "",
"thumb": "",
"keywords": "",
"tags": "",
"description": "fdsfds",
"content": "<p>fdsfdsfds</p>",
"relation": "",
"uid": 1,
"islink": 0,
"username": "水平凡",
"inputtime": 1467968571,
"updatetime": 1467968567,
"views": 7,
"listorder": 0,
"posid": 0,
"status": 99,
"id": 1133,
"isthumb": 0,
"url": "/show/8-1133.html",
"sysadd": 1,
"yesterdayviews": 1,
"dayviews": 1,
"weekviews": 1,
"monthviews": 1,
"viewsupdatetime": 1477897263
}
}
},
"msg": "",
"returns_time": 1502780571
}
<<<
error
~~~
### 根据栏目ID获取信息列表
~~~[api]
get:/v1/bdapp/catlist.html
*int:catid=0#栏目ID
int:limit=20#显示数量
int:page=1#分页ID
string:orderfield=updatetime#排序字段
<<<
{
"status": 1,
"error_code": 0,
"data": {
"list": [
{
"id": 1205,
"catid": 8,
"bcatid": 8,
"title": "dsfdsf",
"isthumb": 0,
"thumb": "",
"keywords": "",
"tags": "",
"description": "fdsf",
"url": "/show/8-1205.html",
"relation": "",
"inputtime": 1501207820,
"updatetime": 1501207817,
"wx_release_date":"2017-08-12 08:12",
"views": 0,
"yesterdayviews": 0,
"dayviews": 0,
"weekviews": 0,
"monthviews": 0,
"viewsupdatetime": 0
},
{
"id": 1204,
"catid": 8,
"bcatid": 8,
"title": "adasdsadsd",
"isthumb": 0,
"thumb": "",
"keywords": "",
"tags": "",
"description": "sdfdf",
"url": "https://www.baidu.com/?",
"relation": "",
"inputtime": 1496969816,
"updatetime": 1496969805,
"wx_release_date":"2017-08-12 08:12",
"views": 0,
"yesterdayviews": 0,
"dayviews": 0,
"weekviews": 0,
"monthviews": 0,
"viewsupdatetime": 0
}
],
"total": 36,
"page": 1,
"size": "2"
},
"msg": "",
"returns_time": 1502931671
}
<<<
error
~~~
### 根据推荐位ID获取信息列表
~~~[api]
get:/v1/bdapp/position.html
*int:posid=0#推荐位ID
limit#返回数量
<<<
success
{
"status": 1,
"error_code": 0,
"data": [
{
"id": 81,
"posid": 1,
"aid": 1202,
"catid": 7,
"thumb": 1,
"data": {
"id": "1202",
"catid": 7,
"title": "事实上",
"url": "/show/7-1202.html",
"inputtime": 1494981884,
"description": "",
"thumb": "http://file.1lwl.cn/d/2017/05/591b9cfd39c44.png",
"views": 0,
"bcatid": 7
},
"synedit": 1,
"listorder": 0,
"bcatid": 7
}
],
"msg": "",
"returns_time": 1505898031
}
<<<
error
~~~
- 域名解析
- 内容模型
- 文章模型
- 图片模型
- 步骤内容模型
- 商品模型(展示)
- 功能扩展
- 友情链接-links
- 留言板-messageboard
- 开放搜索-opensearch
- 微信小程序-wxapp
- 自定义表单-forms
- Banner图管理-banner
- 模板制作
- 常用变量
- 常用函数
- 模板标签
- page分页导航标签
- template模板引入标签
- pre上一篇标签
- next下一篇标签
- navigate导航标签
- position推荐位标签
- catlist信息列表标签
- relation相关文章标签
- category栏目标签
- company企业信息标签
- 模板示例
- 首页模板
- 频道模板
- 栏目列表模板
- 内容页模板
- 常见问题解决方式
- 小程序模版制作
- 开发流程
- 接口管理
- 微信基本API
- 百度基本API
- 留言板
- 常见问题
- 百度小程序