ujcms
  1. 数据
ujcms
  • 数据
    • 栏目列表_ChannelList
      GET
    • 栏目对象_Channel
      GET
    • 栏目对象ByAlias_Channel
      GET
    • 文章列表_ArticleList
      GET
    • 文章分页_ArticlePage
      GET
    • 文章对象_Article
      GET
    • 上一篇文章_ArticlePrev
      GET
    • 下一篇文章_ArticleNext
      GET
    • 全文检索文章分页_EsArticlePage
      GET
    • 全文检索文章列表_EsArticleList
      GET
    • 区块项列表_BlockItemList
      GET
    • 字典列表_DictList
      GET
    • 模型列表_ModelList
      GET
    • 模型对象_Model
      GET
    • Tag列表_TagList
      GET
    • Tag分页_TagPage
      GET
    • 获取Tag对象
      GET
    • 表单列表_FormList
      GET
    • 表单分页_FormPage
      GET
    • 获取表单对象
      GET
    • 站点列表_SiteList
      GET
    • 站点对象_Site
      GET
    • 投票列表_VoteList
      GET
    • 投票分页_VotePage
      GET
    • 投票对象_Vote
      GET
    • 留言列表_MessageBoardList
      GET
    • 留言分页_MessageBoardPage
      GET
    • 获取留言对象
      GET
    • 留言类型列表_MessageBoardTypeList
      GET
    • 调查问卷列表_SurveyList
      GET
    • 调查问卷分页_SurveyPage
      GET
    • 调查问卷对象_Survey
      GET
    • 文章排行榜列表_LeaderBoardList
      GET
    • 文章排行榜分页_LeaderBoardPage
      GET
  • 内容
    • 栏目接口
      • 获取栏目浏览次数
      • 获取栏目统计数据
    • 文章接口
      • 顶文章
      • 记录下载次数
      • 踩文章
      • 获取文章浏览次数
      • 获取下载参数
      • 获取文章统计数据
    • 站点接口
      • 获取站点缓冲对象,并记录浏览量
      • 获取当前站点对象。如果传递subDir参数,则通过子目录查询当前站点;否则通过当前域名获取对应站点对象,无法获取则返回默认站点
      • 获取站点缓冲对象
    • 投票接口
      • 投票
    • 留言接口
      • 提交留言
    • 调查问卷接口
      • 投票
  • 用户
    • JWT认证接口
      • 刷新TOKEN
      • 退出。一般情况下JWT无需服务器端退出。该方法主要用于记录退出日志
      • 登录
    • 注册接口
      • 用户注册
    • 密码接口
      • 更新密码
      • 重置密码
    • 会员设置接口
      • 更新个人信息
      • 更新手机号码
      • 更新邮箱地址
      • 更新个人头像
    • 用户接口
      • 用户名是否未使用
      • 用户名是否存在
      • 手机号码是否未使用
      • 手机号码是否存在
      • 邮箱地址是否未使用
      • 邮箱地址是否存在
    • 上传接口
      • avatarUpload
      • avatarCrop
  • 系统
    • 环境接口
      • 是否开启双因子登录
      • 获得当前登录用户
      • 获取当前站点列表
      • csrf 参数
      • 获取Config配置
      • 获取客户端SM2加密 public key
    • 验证码接口
      • 尝试验证码是否正确
      • 是否显示验证码。当登录错误超过指定次数后,需要输入验证码
      • 获取验证码Token
    • 短信接口
      • 发送手机短信
      • 发送邮件短信
      • 验证手机短信是否正确
      • 验证邮件短信是否正确
  • 其它
    • 访问统计接口
      • 记录访问统计接口
      • 获取在线访问者数量
  1. 数据

栏目列表_ChannelList

GET
/api/channel
栏目接口

标签使用示例#

获取一级栏目列表#

[@ChannelList isNav='true'; channels]
    [#list channels as bean]
    <a href="${bean.url}">${bean.url}</a>
    [/#list]
[/@ChannelList]

获取子栏目列表#

[@ChannelList parentId='23' isNav='true'; channels]
    [#list channels as bean]
    <a href="${bean.url}">${bean.url}</a>
    [/#list]
[/@ChannelList]

获取一级和二级栏目列表#

[@ChannelList isNav='true'; channels]
<ul>
    [#list channels as parent]
    <li>
        <a href="${parent.url}">${parent.url}</a>
        [#if parent.hasChildren]
        [@ChannelList parentId=parent.id isNav='true'; subs]
        <ul>
            [#list subs as sub]
            <li><a href="${sub.url}">${sub.url}</a></li>
            [/#list]
        </ul>
        [/@ChannelList]
        [/#if]
    </li>
    [/#list]
</ul>
[/@ChannelList]

请求参数

Query 参数
siteId
integer <int64>
可选
站点ID。默认为当前站点
parent
string 
上级栏目别名
可选
parentId
integer <int64>
上级栏目ID
可选
isNav
boolean 
可选
是否导航。如:true false
isAllowSearch
boolean 
可选
是否可搜索。如:true false
isIncludeChildren
boolean 
可选
是否包含子栏目。设为 true 时包含所有后代栏目(子级、孙级等),设为 false 时仅包含直接子栏目。默认false
offset
integer <int32>
可选
从第几条数据开始获取。默认为0,即从第一条开始获取
limit
integer <int32>
可选
共获取多少条数据。最大不能超过1000

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://demo.ujcms.com/api/channel?siteId&parent&parentId&isNav&isAllowSearch&isIncludeChildren&offset&limit'

返回响应

🟢200成功
*/*
OK
Body
array of:
id
integer <int64>
栏目ID
必需
siteId
integer <int64>
站点ID
必需
parentId
integer <int64>
上级栏目ID
可选
channelModelId
integer <int64>
栏目模型ID
必需
articleModelId
integer <int64>
文章模型ID
必需
performanceTypeId
integer <int64>
绩效类型ID
可选
name
string 
名称
必需
alias
string 
别名
必需
正则匹配:
^[\w-]*$
type
integer <int32>
必需
类型(1:常规栏目,2:单页栏目,3:转向链接,4:链接到第一个子栏目)
articleTemplate
string 
文章模板
可选
正则匹配:
^(?!.*\.\.).*$
channelTemplate
string 
栏目模板
可选
正则匹配:
^(?!.*\.\.).*$
image
string 
图片
可选
linkUrl
string 
转向链接
可选
正则匹配:
^(http|/).*$
processKey
string 
流程标识
可选
targetBlank
boolean 
是否新窗口打开
必需
nav
boolean 
是否导航菜单
必需
pageSize
integer <int32>
每页条数
必需
orderDesc
boolean 
是否倒序排序
必需
allowComment
boolean 
是否允许评论
必需
allowContribute
boolean 
是否允许投稿
必需
allowSearch
boolean 
是否允许搜索
必需
created
string <date-time>
创建日期
必需
modified
string <date-time>
修改日期
必需
depth
integer <int32>
层级
必需
order
integer <int32>
排列顺序
必需
views
integer <int64>
浏览次数
必需
selfViews
integer <int64>
栏目页浏览次数
必需
mainsJson
string 
可选
自定义主字段JSON
clobsJson
string 
可选
自定义大字段JSON
customs
object 
自定义字段
可选
额外字段
object 
自定义字段
可选
hasChildren
boolean 
是否有子栏目
可选
children
array[object (Channel_List) {46}] 
可选
子栏目列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性为null
id
integer <int64>
栏目ID
必需
siteId
integer <int64>
站点ID
必需
parentId
integer <int64>
上级栏目ID
可选
channelModelId
integer <int64>
栏目模型ID
必需
articleModelId
integer <int64>
文章模型ID
必需
performanceTypeId
integer <int64>
绩效类型ID
可选
name
string 
名称
必需
alias
string 
别名
必需
正则匹配:
^[\w-]*$
type
integer <int32>
必需
类型(1:常规栏目,2:单页栏目,3:转向链接,4:链接到第一个子栏目)
articleTemplate
string 
文章模板
可选
正则匹配:
^(?!.*\.\.).*$
channelTemplate
string 
栏目模板
可选
正则匹配:
^(?!.*\.\.).*$
image
string 
图片
可选
linkUrl
string 
转向链接
可选
正则匹配:
^(http|/).*$
processKey
string 
流程标识
可选
targetBlank
boolean 
是否新窗口打开
必需
nav
boolean 
是否导航菜单
必需
pageSize
integer <int32>
每页条数
必需
orderDesc
boolean 
是否倒序排序
必需
allowComment
boolean 
是否允许评论
必需
allowContribute
boolean 
是否允许投稿
必需
allowSearch
boolean 
是否允许搜索
必需
created
string <date-time>
创建日期
必需
modified
string <date-time>
修改日期
必需
depth
integer <int32>
层级
必需
order
integer <int32>
排列顺序
必需
views
integer <int64>
浏览次数
必需
selfViews
integer <int64>
栏目页浏览次数
必需
mainsJson
string 
可选
自定义主字段JSON
clobsJson
string 
可选
自定义大字段JSON
customs
object 
自定义字段
可选
hasChildren
boolean 
是否有子栏目
可选
children
array[object (Channel_List) {46}] 
可选
子栏目列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性为null
parent
object (Channel_List) 
栏目实体类
可选
site
object (Site_List) 
站点实体类
可选
channelModel
object (Model_List) 
模型实体类
可选
articleModel
object (Model_List) 
模型实体类
可选
performanceType
object (PerformanceType_List) 
可选
description
string 
可选
描述。获取seoDescription
url
string 
URL地址
可选
keywords
string 
可选
关键词。获取seoKeywords
dynamicUrl
string 
动态URL地址
可选
staticUrl
string 
可选
names
array[string]
可选
栏目层级名称。从一级栏目到当前栏目的名称列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性只包含当前栏目名称
paths
array[object (Channel_List) {46}] 
可选
栏目层级。从一级栏目到当前栏目的列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性只包含当前栏目
link
boolean 
是否链接
可选
title
string 
可选
标题。获取seoTitle,如不存在,则获取栏目名称
parent
object (Channel_List) 
栏目实体类
可选
site
object (Site_List) 
站点实体类
可选
id
integer <int64>
站点ID
必需
parentId
integer <int64>
上级站点ID
可选
orgId
integer <int64>
组织ID
必需
modelId
integer <int64>
模型ID
必需
name
string 
名称
必需
description
string 
描述
可选
protocol
string 
必需
协议(http,https)
domain
string 
域名
必需
正则匹配:
^(?!(uploads|templates|WEB-INF|cp)$)[a-z0-9-.]*
subDir
string 
子目录
可选
正则匹配:
^(?!(uploads|templates|WEB-INF|cp)$)[\w-]*
theme
string 
主题
必需
mobileTheme
string 
手机端主题
必需
pageSize
integer <int32>
每页条数
必需
logo
string 
LOGO
可选
seoTitle
string 
SEO标题
可选
seoKeywords
string 
SEO关键词
可选
seoDescription
string 
SEO描述
可选
staticFile
string 
静态页文件
可选
mobileStaticFile
string 
手机端静态页文件
可选
editorSettings
string 
编辑器设置
可选
status
integer <int32>
必需
状态(0:正常,1:关闭)
depth
integer <int32>
层级
必需
order
integer <int32>
排列顺序
必需
views
integer <int64>
浏览次数
必需
selfViews
integer <int64>
首页浏览次数
必需
todayViews
integer <int32>
今日浏览次数
必需
yesterdayViews
integer <int32>
昨日浏览次数
必需
maxViews
integer <int32>
最高浏览次数
必需
maxDate
string <date-time>
最高浏览日期
必需
mainsJson
string 
可选
自定义主字段JSON
clobsJson
string 
可选
自定义大字段JSON
customs
object 
自定义字段
可选
watermark
object (Site.Watermark_List) 
水印设置
可选
html
object (Site.Html_List) 
静态页配置
可选
messageBoard
object (Site.MessageBoard_List) 
留言板设置
可选
editor
object 
可选
copyFromId
integer <int64>
复制站点ID
可选
copyData
array[string]
复制数据
可选
hasChildren
boolean 
是否有子站点
可选
parent
object (Site_List) 
站点实体类
可选
org
object (Org_List) 
组织实体类
可选
model
object (Model_List) 
模型实体类
可选
enabled
boolean 
可选
url
string 
URL地址
可选
filesPath
string 
可选
模板文件路径。如:/templates/1/default/_files
api
string 
可选
API 接口地址。如:{@code /contextPath/frontend}
mobileStaticUrl
string 
可选
手机端静态URL地址
dynamicUrl
string 
动态URL地址
可选
staticUrl
string 
静态URL地址
可选
normalStaticUrl
string 
可选
PC端静态URL地址
dy
string 
可选
动态地址,含部署路径、子目录,不含域名、端口。如:{@code /contextPath/subDir}
names
array[string]
可选
站点层级名称。从一级栏目到当前栏目的名称列表
template
string 
可选
staticBase
string 
可选
paths
array[object (Site_List) {58}] 
可选
站点层级。从一级站点到当前站点的列表
disabled
boolean 
可选
htmlEnabled
boolean 
可选
title
string 
可选
标题。先获取SeoTitle,如不存在则获取网站名称
targetBlank
boolean 
是否新窗口打开
可选
channelModel
object (Model_List) 
模型实体类
可选
articleModel
object (Model_List) 
模型实体类
可选
performanceType
object (PerformanceType_List) 
可选
id
integer <int64>
绩效类型ID
必需
siteId
integer <int64>
站点ID
必需
name
string 
名称
必需
score
integer <int32>
分数
必需
order
integer <int64>
排列顺序
必需
description
string 
可选
描述。获取seoDescription
url
string 
URL地址
可选
keywords
string 
可选
关键词。获取seoKeywords
dynamicUrl
string 
动态URL地址
可选
staticUrl
string 
可选
names
array[string]
可选
栏目层级名称。从一级栏目到当前栏目的名称列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性只包含当前栏目名称
paths
array[object (Channel_List) {46}] 
可选
栏目层级。从一级栏目到当前栏目的列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性只包含当前栏目
id
integer <int64>
栏目ID
必需
siteId
integer <int64>
站点ID
必需
parentId
integer <int64>
上级栏目ID
可选
channelModelId
integer <int64>
栏目模型ID
必需
articleModelId
integer <int64>
文章模型ID
必需
performanceTypeId
integer <int64>
绩效类型ID
可选
name
string 
名称
必需
alias
string 
别名
必需
正则匹配:
^[\w-]*$
type
integer <int32>
必需
类型(1:常规栏目,2:单页栏目,3:转向链接,4:链接到第一个子栏目)
articleTemplate
string 
文章模板
可选
正则匹配:
^(?!.*\.\.).*$
channelTemplate
string 
栏目模板
可选
正则匹配:
^(?!.*\.\.).*$
image
string 
图片
可选
linkUrl
string 
转向链接
可选
正则匹配:
^(http|/).*$
processKey
string 
流程标识
可选
targetBlank
boolean 
是否新窗口打开
必需
nav
boolean 
是否导航菜单
必需
pageSize
integer <int32>
每页条数
必需
orderDesc
boolean 
是否倒序排序
必需
allowComment
boolean 
是否允许评论
必需
allowContribute
boolean 
是否允许投稿
必需
allowSearch
boolean 
是否允许搜索
必需
created
string <date-time>
创建日期
必需
modified
string <date-time>
修改日期
必需
depth
integer <int32>
层级
必需
order
integer <int32>
排列顺序
必需
views
integer <int64>
浏览次数
必需
selfViews
integer <int64>
栏目页浏览次数
必需
mainsJson
string 
可选
自定义主字段JSON
clobsJson
string 
可选
自定义大字段JSON
customs
object 
自定义字段
可选
hasChildren
boolean 
是否有子栏目
可选
children
array[object (Channel_List) {46}] 
可选
子栏目列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性为null
parent
object (Channel_List) 
栏目实体类
可选
site
object (Site_List) 
站点实体类
可选
channelModel
object (Model_List) 
模型实体类
可选
articleModel
object (Model_List) 
模型实体类
可选
performanceType
object (PerformanceType_List) 
可选
description
string 
可选
描述。获取seoDescription
url
string 
URL地址
可选
keywords
string 
可选
关键词。获取seoKeywords
dynamicUrl
string 
动态URL地址
可选
staticUrl
string 
可选
names
array[string]
可选
栏目层级名称。从一级栏目到当前栏目的名称列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性只包含当前栏目名称
paths
array[object (Channel_List) {46}] 
可选
栏目层级。从一级栏目到当前栏目的列表。只有在单独查询栏目对象时,才有此属性;查询栏目列表时,此属性只包含当前栏目
link
boolean 
是否链接
可选
title
string 
可选
标题。获取seoTitle,如不存在,则获取栏目名称
link
boolean 
是否链接
可选
title
string 
可选
标题。获取seoTitle,如不存在,则获取栏目名称
示例
[
  {
    "id": 0,
    "siteId": 0,
    "parentId": 0,
    "channelModelId": 0,
    "articleModelId": 0,
    "performanceTypeId": 0,
    "name": "string",
    "alias": "string",
    "type": 0,
    "articleTemplate": "string",
    "channelTemplate": "string",
    "image": "string",
    "linkUrl": "string",
    "processKey": "string",
    "targetBlank": true,
    "nav": true,
    "pageSize": 0,
    "orderDesc": true,
    "allowComment": true,
    "allowContribute": true,
    "allowSearch": true,
    "created": "2019-08-24T14:15:22Z",
    "modified": "2019-08-24T14:15:22Z",
    "depth": 0,
    "order": 0,
    "views": 0,
    "selfViews": 0,
    "mainsJson": "string",
    "clobsJson": "string",
    "customs": {
      "property1": {},
      "property2": {}
    },
    "hasChildren": true,
    "children": [
      {}
    ],
    "parent": {},
    "site": {
      "id": 0,
      "parentId": 0,
      "orgId": 0,
      "modelId": 0,
      "name": "string",
      "description": "string",
      "protocol": "string",
      "domain": "string",
      "subDir": "string",
      "theme": "string",
      "mobileTheme": "string",
      "pageSize": 0,
      "logo": "string",
      "seoTitle": "string",
      "seoKeywords": "string",
      "seoDescription": "string",
      "staticFile": "string",
      "mobileStaticFile": "string",
      "editorSettings": "string",
      "status": 0,
      "depth": 0,
      "order": 0,
      "views": 0,
      "selfViews": 0,
      "todayViews": 0,
      "yesterdayViews": 0,
      "maxViews": 0,
      "maxDate": "2019-08-24T14:15:22Z",
      "mainsJson": "string",
      "clobsJson": "string",
      "customs": {
        "property1": {},
        "property2": {}
      },
      "watermark": {
        "enabled": true,
        "overlay": "string",
        "position": 0,
        "dissolve": 0,
        "minWidth": 0,
        "minHeight": 0
      },
      "html": {
        "enabled": true,
        "auto": true,
        "listPages": 0,
        "channel": "string",
        "article": "string",
        "enabledAndAuto": true
      },
      "messageBoard": {
        "enabled": true,
        "loginRequired": true
      },
      "editor": {
        "property1": {},
        "property2": {}
      },
      "copyFromId": 0,
      "copyData": [
        "string"
      ],
      "hasChildren": true,
      "parent": {},
      "org": {
        "id": 0,
        "parentId": 0,
        "name": "string",
        "phone": "string",
        "address": "string",
        "contacts": "string",
        "depth": 0,
        "order": 0,
        "hasChildren": true,
        "names": [
          "string"
        ],
        "paths": [
          {}
        ]
      },
      "model": {
        "id": 0,
        "siteId": 0,
        "name": "string",
        "type": "string",
        "scope": 0,
        "order": 0,
        "mains": "string",
        "asides": "string",
        "customs": "string"
      },
      "enabled": true,
      "url": "string",
      "filesPath": "string",
      "api": "string",
      "mobileStaticUrl": "string",
      "dynamicUrl": "string",
      "staticUrl": "string",
      "normalStaticUrl": "string",
      "dy": "string",
      "names": [
        "string"
      ],
      "template": "string",
      "staticBase": "string",
      "paths": [
        {}
      ],
      "disabled": true,
      "htmlEnabled": true,
      "title": "string",
      "targetBlank": true
    },
    "channelModel": {
      "id": 0,
      "siteId": 0,
      "name": "string",
      "type": "string",
      "scope": 0,
      "order": 0,
      "mains": "string",
      "asides": "string",
      "customs": "string"
    },
    "articleModel": {
      "id": 0,
      "siteId": 0,
      "name": "string",
      "type": "string",
      "scope": 0,
      "order": 0,
      "mains": "string",
      "asides": "string",
      "customs": "string"
    },
    "performanceType": {
      "id": 0,
      "siteId": 0,
      "name": "string",
      "score": 0,
      "order": 0
    },
    "description": "string",
    "url": "string",
    "keywords": "string",
    "dynamicUrl": "string",
    "staticUrl": "string",
    "names": [
      "string"
    ],
    "paths": [
      {}
    ],
    "link": true,
    "title": "string"
  }
]
下一页
栏目对象_Channel
Built with