内容库
内容库操作
获取内容库详情
BaaS.ContentGroup.get(contentGroupID)
参数说明
contentGroupID
Number
是
内容库 ID
请求示例
返回示例
res.data:
获取内容库列表
BaaS.ContentGroup.find(options)
参数说明
options:
withCount
boolean
否
true
是否返回 total_count
offset
number
否
true
偏移量
limit
number
否
true
数量限制
{{totalCount.withCountTips()}}
请求示例
返回示例
res.data:
内容操作(已废弃,请查看内容操作)
以下操作都需指明操作的内容库,方法如下:
let MyContentGroup = new BaaS.ContentGroup(contentGroupID)
参数说明
contentGroupID
Number
是
内容库 ID
获取内容详情(已废弃,请查看内容操作)
MyContentGroup.getContent(richTextID)
参数说明
richTextID
Number
是
内容 ID
返回参数
categories
Number Array
内容分类
content
String
内容详情
cover
String
封面图 url
created_at
Number
创建时间
created_by
Number
user ID
description
String
摘要
group_id
Number
内容库 ID
id
Number
内容 ID
title
String
内容标题
update_at
Number
更新时间
info 如果有自定义字段,则一并返回
请求示例
返回示例
res.data:
查询,获取内容列表(已废弃,请查看内容操作)
BaaS.ContentGroup#find(options)
参数说明
options:
withCount
boolean
否
true
是否返回 total_count
{{totalCount.withCountTips()}}
内容查询与数据表查询方法一致
请求示例
获取分类详情(已废弃,请查看内容分类操作)
MyContentGroup.getCategory(categoryID)
OBJECT 参数说明
categoryID
Number
是
分类 ID
返回参数
children
Array
子分类列表
have_children
Boolean
是否含有子分类
id
Number
分类 ID
name
String
分类名称
请求示例
返回示例
res.data:
获取内容库分类列表(已废弃,请查看内容分类操作)
BaaS.ContentGroup#getCategoryList(options)
参数说明
options:
withCount
boolean
否
true
是否返回 total_count
{{totalCount.withCountTips()}}
请求示例
分页与排序
内容查询的分页与排序操作和数据表分页与排序方法一致
请求示例
Last updated
Was this helpful?