指令(命名空间:api)

指令(命名空间:cms)

指令(命名空间:log)

指令(命名空间:oauth)

指令(命名空间:sys)

指令(命名空间:task)

指令(命名空间:tools)

指令(命名空间:trade)

指令(命名空间:visit)

函数

PublicCMS 函数指令手册 202406

appClient 客户端注册接口

参数列表

  • uuid:设备唯一id
  • clientVersion:客户端版本

使用示例

<script>
$.getJSON('${site.dynamicPath}api/appClient?uuid=1&clientVersion=1.0&appToken=接口访问授权Token', function(data){
});
</script>
 
appToken 接口访问授权Token获取接口

参数列表

  • appKey:应用key
  • appSecret:应用密钥

返回结果

  • appToken:接口访问授权Token
  • expiryDate:过期日期
  • error:错误信息,当appKey、appSecret为空或错误时返回【secretError】
使用示例

<script>
$.getJSON('${site.dynamicPath}api/appToken?appKey=1&appSecret=1', function(data){
  $('article p em').text(data.clicks);
});
</script>
 
autoLogin 自动登录接口

参数列表

  • uuid:设备唯一id
  • username:用户名
  • channel:登陆渠道

返回结果

  • result:登录结果,【true,false】
  • authToken:用户登录授权
  • expiryDate:过期日期
  • user:用户信息
    • id : id
    • name : name 用户名
    • weakPassword : weak password 弱密码
    • nickname : nickname 昵称
    • cover : cover 封面图
    • deptId : dept id 部门id
    • contentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)
    • roles : role ids 角色id
    • email : email 邮件地址
    • emailChecked : email checked 已验证邮件
    • superuser : super user 管理员
    • disabled : disabled 已禁用p
    • lastLoginDate : last login date 上次登录日期
    • lastLoginIp : last login ip 上次登录ip
    • loginCount : login count 登录次数
    • registeredDate : register date 注册日期
使用示例

<script>
$.getJSON('${site.dynamicPath}api/autoLogin?uuid=1&username=admin&channel=web', function(data){
    console.log(result+","+authToken+","+user.nickname+","+expiryDate);
});
</script>
 
bindingUser 客户端绑定用户接口

参数列表

  • uuid:设备唯一id
  • channel:客户端版本

返回结果

  • result:绑定结果
使用示例

<script>
$.getJSON('${site.dynamicPath}api/bindingUser?uuid=1&channel=web&authToken=用户登录授权&authUserId=1', function(data){
console.log(data.result);
});
</script>
 
clearCache 缓存清理接口

使用示例

  <script>
   $.getJSON('${site.dynamicPath}api/clearCache&appToken=接口访问授权Token', function(data){    
     console.log("ok");
   });
   </script>
 
contentCheck 内容审核接口

参数列表

  • ids:多个内容id
  • uncheck:取消审核, 【true,false】,默认为false

返回结果

使用示例

<script>
$.getJSON('${site.dynamicPath!}api/contentCheck?ids=1,2&authToken=用户登录授权&authUserId=1&appToken=接口访问授权Token', function(data){
});
</script>
 
contentClick 内容点击接口

参数列表

  • id:内容id

返回结果

  • clicks:内容点击数
使用示例

<script>
$.getJSON('${site.dynamicPath}api/contentClick?id=1', function(data){
  console.log(data.clicks);
});
</script>
 
contentCreate 内容创建接口

参数列表

  • id:内容id,为空时新建内容
  • categoryId:分类id
  • modelId:模型id
  • title:标题
  • description:描述
  • author:作者
  • editor:编辑
  • copied:转载,【true,false】,默认为false
  • publishDate:发布日期,默认为当前日期
  • tagNames:多个标签名
  • tagIds:多个标签id
  • url:url,当模型为外链时有效
  • checked:已审核,【true,false】,默认为false
  • extendData:扩展数据map
  • source:来源
  • sourceUrl:来源URL
  • text:正文html
  • draft:草稿,审核为false时有效,【true,false】,默认为false
  • parentId:父id,模型为子模型时有效
  • filePaths:多个文件路径
  • fileDescriptions:多个文件描述
  • imagePaths:多个图片路径
  • imageDescriptions:多个图片描述

返回结果

  • result:结果【failed:失败,success:成功】
  • contentId:内容id,当result为success时有效
  • error:错误,当result为failed时有效
使用示例

<script>
$.getJSON('${site.dynamicPath!}api/contentCreate?categoryId=1&modelId=article&title=title&text=%3Cdiv%3Econtent%3C/div%3E&extendData.field1=value1&extendData.field2=value2&authToken=用户登录授权&authUserId=1&appToken=接口访问授权Token', function(data){
console.log(data.result);
});
</script>
 
login 登录接口

参数列表

  • username:设备唯一id
  • password:用户名
  • encoding:密码加密方式
  • channel:登录渠道

返回结果

  • result:登录结果,【true,false】
  • authToken:用户登录授权
  • expiryDate:过期日期
  • user:用户信息
    • id : id
    • name : name 用户名
    • weakPassword : weak password 弱密码
    • nickname : nickname 昵称
    • cover : cover 封面图
    • deptId : dept id 部门id
    • contentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)
    • roles : role ids 角色id
    • email : email 邮件地址
    • emailChecked : email checked 已验证邮件
    • superuser : super user 管理员
    • disabled : disabled 已禁用p
    • lastLoginDate : last login date 上次登录日期
    • lastLoginIp : last login ip 上次登录ip
    • loginCount : login count 登录次数
    • registeredDate : register date 注册日期
使用示例

<script>
$.getJSON('${site.dynamicPath}api/login?username=admin&password=sha512encodingpassword&encoding=sha512&channel=web', function(data){
    console.log(result+","+authToken+","+user.nickname+","+expiryDate);
});
</script>
 
myContentList 我的内容接口

参数列表

  • categoryId:分类id,当parentId为空时有效
  • containChild:是否包含子分类,【true,false】
  • categoryIds:多个分类id,当categoryId为空时有效
  • modelId:多个模型id
  • parentId:父内容id
  • onlyUrl:外链,【true,false】
  • hasImages:拥有图片列表,【true,false】
  • hasFiles:拥有附件列表,【true,false】
  • hasProducts:拥有产品列表,【true,false】
  • startPublishDate:发布日期开始时间,【2020-01-01 23:59:59】,【2020-01-01】
  • endPublishDate:发布日期结束时间,高级选项禁用时不能超过现在,【2020-01-01 23:59:59】,【2020-01-01】
  • status:内容状态,【0:操作,1:已发布,2:待审核,3:驳回】
  • emptyParent:高级选项:父内容id是否为空,【true,false】,当parentId为空时有效
  • orderField 排序字段,【score:评分,comments:评论数,clicks:点击数,publishDate:发布日期,updateDate:更新日期,checkDate:审核日期】,默认置顶级别倒序、发布日期按orderType排序
  • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
  • pageIndex:页码
  • pageSize:每页条数

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表
    • id : id
    • title : title 标题
    • userId : user id 发布用户ID
    • deptId : dept id 发布用户部门ID
    • checkUserId : check user id 审核用户ID
    • categoryId : category id 分类ID
    • modelId : model id 模型ID
    • parentId : parent id 父内容ID
    • quoteContentId : quote content id 引用内容ID
    • copied : copied 转载
    • author : author 作者
    • editor : editor 编辑
    • onlyUrl : external link 外链
    • hasImages : has images 拥有图片列表
    • hasFiles : has files 拥有附件列表
    • hasProducts : has products 拥有产品列表
    • hasStatic : has static file 静态化
    • url : url 链接地址
    • description : description 描述
    • tagIds : tag ids 多个标签id
    • cover : cover 封面图
    • childs : childs 子内容数
    • scores : total scores 总分数
    • scoreUsers : score users 评分用户数
    • score : score 分数
    • comments : comments 评论数
    • clicks : clicks 点击数
    • collections : collections 收藏数
    • publishDate : publish date 发布日期
    • expiryDate : expiry date 过期日期
    • checkDate : check date 审核日期
    • updateUserId : update user id 更新用户id
    • updateDate : update date 更新日期
    • createDate : create date 创建日期
    • sort : top 置顶级别
    • status : status(0:Draft,1:Published,2:Pending,3:Rejected) 状态(0:草稿,1:已发布,2:待审核,3:驳回)
使用示例

<script>
$.getJSON('${site.dynamicPath!}api/myContentList?pageSize=10&authToken=用户登录授权&authUserId=1', function(data){
    console.log(data.page.totalCount);
});
</script>
 
refreshToken 刷新appToken接口

参数列表

  • appToken:设备唯一id

返回结果

  • authToken:用户登录授权
  • expiryDate:过期日期
  • error:错误信息【needNotRefresh】
使用示例

<script>
$.getJSON('${site.dynamicPath}api/login?appToken=接口访问授权Token', function(data){
    console.log(appToken+","+expiryDate);
});
</script>
 
unBindingUser 客户端绑定用户接口

参数列表

  • uuid:设备唯一id
  • channel:客户端版本

返回结果

  • result:取消绑定结果
使用示例

<script>
$.getJSON('${site.dynamicPath}api/unBindingUser?uuid=1&channel=web&authToken=用户登录授权&authUserId=1', function(data){
console.log(data.result);
});
</script>
 
upload 上传接口

认证头

  • appToken:应用授权Token
  • authToken:用户登录Token
  • authUserId:用户id

参数列表

  • file:文件
  • base64File:文件的base64编码字符串,文件为空时生效
  • originalFilename:文件原名,文件以base64方式上传时需要
  • privatefile:是否私有文件

返回结果

  • result:上传结果,【true,false】
  • error:错误原因编码
  • fileName:文件路径
  • fileType:文件类型
  • fileSize:文件大小
使用示例

<script>
$('input[type=file]').change(function() {
    var formData = new FormData();
    var file = this.files[0];
    formData.append('file', file);
    $.ajax({url:'${site.dynamicPath}api/upload',type:'post',headers: {'appToken': 'your app token','':'','':''},data: formData,, success:function(data){
        console.log(result+","+error+","+fileName);
    });
});
</script>
 
category 分类查询指令

参数列表

  • id:分类id,结果返回object
    • id : id
    • name : name 名称
    • parentId : parent id 父id
    • typeId : type id 分类类型id
    • childIds : child ids 子分类id
    • tagTypeIds : tag type ids 标签类型id
    • code : code 编码
    • customPath : custom path 自定义访问路径
    • onlyUrl : extend link 外链
    • hasStatic : has static file 有静态化文件
    • url : url 链接地址
    • customContentPath : custom content path 自定义内容访问路径
    • containChild : contain child content 包含子分类内容
    • pageSize : content page size 内容分页大小
    • allowContribute : allow contribute 允许投稿
    • sort : sort 排序
    • hidden : hidden 前台隐藏
    • workflowId : workflow 工作流
  • code:分类编码,当id为空时生效,结果返回object
  • absoluteURL:url处理为绝对路径 默认为true
  • containsAttribute默认为false,http请求时为高级选项,为true时object.attribute为分类扩展数据map(字段编码,value)
  • ids: 多个分类id,逗号或空格间隔,当id或code为空时生效,结果返回map(id,object)
使用示例

<@cms.category id=1>${object.name}</@cms.category>

<@cms.category ids=1,2,3><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.category>

   <script>
    $.getJSON('${site.dynamicPath}api/directive/cms/category?id=1', function(data){    
      console.log(data.name);
    });
    </script>
 
categoryList 分类列表查询指令

参数列表

  • parentId:父分类id
  • typeId:分类类型id
  • absoluteURL:url处理为绝对路径, 默认为 true
  • queryAll:查询全部,【true,false】,parentId为空时有效
  • advanced:开启高级选项, 默认为false
  • containsAttribute默认为true,http请求时为高级选项,为true时category.attribute为分类扩展数据map(字段编码,value)
  • disabled:高级选项:禁用状态, 默认为false
  • hidden:高级选项:隐藏,【true,false】
  • pageIndex:页码
  • pageSize:每页条数

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表,顺序排序正序,id倒序
    • id : id
    • name : name 名称
    • parentId : parent id 父id
    • typeId : type id 分类类型id
    • childIds : child ids 子分类id
    • tagTypeIds : tag type ids 标签类型id
    • code : code 编码
    • customPath : custom path 自定义访问路径
    • onlyUrl : extend link 外链
    • hasStatic : has static file 有静态化文件
    • url : url 链接地址
    • customContentPath : custom content path 自定义内容访问路径
    • containChild : contain child content 包含子分类内容
    • pageSize : content page size 内容分页大小
    • allowContribute : allow contribute 允许投稿
    • sort : sort 排序
    • hidden : hidden 前台隐藏
    • workflowId : workflow 工作流
使用示例

<@cms.categoryList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.categoryList>

   <script>
    $.getJSON('${site.dynamicPath}api/directive/cms/categoryList?pageSize=10', function(data){    
      console.log(data.page.totalCount);
    });
    </script>
 
categoryModel 分类内容模型映射查询指令

参数列表

  • categoryId:分类id,结果返回object
    • id : id
    • customContentPath : custom content path 自定义内容访问路径
    • templatePath : template path 模板路径
    • contentPath : content path 内容路径
  • modelId:内容模型id,当id为空时生效,结果返回object
  • modelIds 多个内容模型id,当categoryId存在,且modelId为空时生效,结果返回map(内容模型id,object)
  • categoryIds 多个分类id,当categoryId不存在,且modelId存在时生效,结果返回map(分类id,object)
使用示例

<@cms.categoryModel categoryId=1 modelId='article'>${object.templatePath}</@cms.categoryModel>

<@cms.categoryModel categoryIds=1,2,3 modelId='article'><#list map as k,v>${k}:${v.templatePath}<#sep>,</#list></@cms.categoryModel>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/categoryModel?categoryId=1&modelId=article', function(data){    
     console.log(data.templatePath);
   });
   </script>
 
categoryModelList 分类模型映射列表查询指令

参数列表

  • modelId:内容模型id
  • categoryId:分类id

返回结果

  • list:List类型 查询结果实体列表
    • id : id
    • customContentPath : custom content path 自定义内容访问路径
    • templatePath : template path 模板路径
    • contentPath : content path 内容路径
使用示例

<@cms.categoryModelList modelId='article'><#list list as a>${a.templatePath}<#sep>,</#list></@cms.categoryModelList>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/categoryModelList?modelId=article', function(data){    
     console.log(data[0].totalCount);
   });
   </script>
 
categoryType 分类类型查询指令

参数列表

  • id:分类id,结果返回object
    • id : id
    • name : name

      名称

    • onlyUrl : extend link

      外链

    • sort : sort

      排序

    • templatePath : static template path

      静态化模板路径

    • path : path

      访问路径

    • containChild : contain child category's content

      包含子分类内容

    • pageSize : page size

      分页大小

    • extendList : extend field list

      扩展字段列表

  • ids: 多个分类id,逗号或空格间隔,当id或code为空时生效,结果返回map(id,object)
使用示例

<@cms.categoryType id=1>${object.name}</@cms.categoryType>

<@cms.categoryType ids=1,2,3><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.categoryType>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/categoryType?id=banner', function(data){    
     console.log(data.name);
   });
   </script>
 
categoryTypeList 分类类型列表查询指令

没有可用于查询得参数,该指令固定返回所有结果,不可分页查询

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表
    • id : id
    • name : name

      名称

    • onlyUrl : extend link

      外链

    • sort : sort

      排序

    • templatePath : static template path

      静态化模板路径

    • path : path

      访问路径

    • containChild : contain child category's content

      包含子分类内容

    • pageSize : page size

      分页大小

    • extendList : extend field list

      扩展字段列表

使用示例

<@cms.categoryTypeList><#list page.list as a>${a.name}<#sep>,</#list></@cms.categoryTypeList>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/categoryTypeList', function(data){    
     console.log(data.page.totalCount);
   });
   </script>
 
comment 评论查询指令

参数列表

  • replaceSensitive:替换敏感词, 默认为true
  • id:评论id,结果返回object
    • id : id
    • userId : user id 发布用户id
    • replyId : reply comment id 回复评论id
    • replyUserId : reply user id 回复用户id
    • replies : replies 回复数
    • scores : scores 分数
    • contentId : content id 内容id
    • ip : ip
    • checkUserId : check user 审核用户
    • checkDate : check date 审核日期
    • updateDate : update date 更新日期
    • createDate : create date 创建日期
    • status : status(1:Published,2:Pending) 状态(1:已审核,2:待审核)
  • ids: 多个评论id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
使用示例

<@cms.comment id=1>${object.text}</@cms.comment>

<@cms.comment ids=1,2,3><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.comment>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/comment?id=1&appToken=接口访问授权Token', function(data){    
     console.log(data.text);
   });
   </script>
 
commentList 评论列表查询指令

参数列表

  • userId:发布评论用户id
  • replyId:被回复评论id
  • contentId:内容id
  • emptyReply:回复id是否为空, replyId为空时有效,默认为false
  • replyUserId:被回复用户id
  • replaceSensitive:替换敏感词, 默认为true
  • advanced:开启高级选项, 默认为false
  • status:高级选项:评论状态,【1:已发布,2:待审核】
  • checkUserId:高级选项:审核用户id
  • disabled:高级选项:评论已删除,【true,false】
  • orderField 排序字段,【replies:回复数,scores:评分,checkDate:审核日期,updateDate:更新日期,createDate:创建日期】,默认置顶id按orderType排序
  • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
  • pageIndex:页码
  • pageSize:每页条数

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表
    • id : id
    • userId : user id 发布用户id
    • replyId : reply comment id 回复评论id
    • replyUserId : reply user id 回复用户id
    • replies : replies 回复数
    • scores : scores 分数
    • contentId : content id 内容id
    • ip : ip
    • checkUserId : check user 审核用户
    • checkDate : check date 审核日期
    • updateDate : update date 更新日期
    • createDate : create date 创建日期
    • status : status(1:Published,2:Pending) 状态(1:已审核,2:待审核)
使用示例

<@cms.commentList contentId=1 pageSize=10><#list page.list as a>${a.text}<#sep>,</#list></@cms.commentList>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/commentList?contentId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
     console.log(data.page.totalCount);
   });
   </script>
 
content 内容查询指令

参数列表

  • id 内容id,结果返回object
    • id : id
    • title : title 标题
    • userId : user id 发布用户ID
    • deptId : dept id 发布用户部门ID
    • checkUserId : check user id 审核用户ID
    • categoryId : category id 分类ID
    • modelId : model id 模型ID
    • parentId : parent id 父内容ID
    • quoteContentId : quote content id 引用内容ID
    • copied : copied 转载
    • author : author 作者
    • editor : editor 编辑
    • onlyUrl : external link 外链
    • hasImages : has images 拥有图片列表
    • hasFiles : has files 拥有附件列表
    • hasProducts : has products 拥有产品列表
    • hasStatic : has static file 静态化
    • url : url 链接地址
    • description : description 描述
    • tagIds : tag ids 多个标签id
    • cover : cover 封面图
    • childs : childs 子内容数
    • scores : total scores 总分数
    • scoreUsers : score users 评分用户数
    • score : score 分数
    • comments : comments 评论数
    • clicks : clicks 点击数
    • collections : collections 收藏数
    • publishDate : publish date 发布日期
    • expiryDate : expiry date 过期日期
    • checkDate : check date 审核日期
    • updateUserId : update user id 更新用户id
    • updateDate : update date 更新日期
    • createDate : create date 创建日期
    • sort : top 置顶级别
    • status : status(0:Draft,1:Published,2:Pending,3:Rejected) 状态(0:草稿,1:已发布,2:待审核,3:驳回)
  • absoluteURL:url处理为绝对路径 默认为 true
  • absoluteId:id处理为引用内容的ID 默认为 true
  • containsAttribute 默认为false,http请求时为高级选项,为true时object.attribute为内容扩展数据map(字段编码,value)
  • ids: 多个内容id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
使用示例

<@cms.content id=1>${object.title}</@cms.content>

<@cms.content ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.content>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/content?id=1', function(data){    
     console.log(data.title);
   });
   </script>
 
categoryFileList 内容附件列表查询指令

参数列表

  • fileTypes:文件类型,【image:图片,video:视频,audio:音频,other:其他】
  • image:是否图片,当fileTypes为空时有效,【true,false】
  • contentId:内容id
  • userId:用户id
  • absoluteURL:url处理为绝对路径 默认为true
  • orderField:排序字段,【size:文件大小,clicks:点击数】,默认排序正序、id正序
  • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
  • pageIndex:页码
  • pageSize:每页条数

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表
    • id : id
    • contentId : content id

      内容id

    • userId : upload user id

      上传用户id

    • filepath : file path

      文件路径

    • fileType : file type

      文件类型

    • fileSize : file size

      文件大小

    • width : width

    • height : height

    • clicks : clicks

      点击数

    • sort : sort

      排序

    • description : description

      描述

使用示例

<@cms.contentFileList contentId=1 pageSize=10><#list page.list as a>${a.filePath}<#sep>,</#list></@cms.contentFileList>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/contentFileList?contentId=1&pageSize=10', function(data){    
     console.log(data.page.totalCount);
   });
   </script>
 
contentList 内容列表查询指令

参数列表

  • categoryId:分类id,当parentId为空时有效
  • containChild:是否包含子分类,【true,false】
  • categoryIds:多个分类id,当categoryId为空时有效
  • modelId:多个模型id
  • parentId:父内容id
  • onlyUrl:外链,【true,false】
  • hasImages:拥有图片列表,【true,false】
  • hasFiles:拥有附件列表,【true,false】
  • hasProducts:拥有产品列表,【true,false】
  • hasCover:拥有封面图,【true,false】
  • userId:发布用户id
  • startPublishDate:起始发布日期,【2020-01-01 23:59:59】,【2020-01-01】
  • endPublishDate:终止发布日期,高级选项禁用时不能超过现在,【2020-01-01 23:59:59】,【2020-01-01】
  • advanced:开启高级选项, 默认为false
  • status:高级选项:内容状态,【0:操作,1:已发布,2:待审核,3:驳回】
  • disabled:高级选项:禁用状态,默认为false
  • emptyParent:高级选项:父内容id是否为空,【true,false】,当parentId为空时有效
  • title:高级选项:标题
  • absoluteURL:url处理为绝对路径 默认为true
  • absoluteId:id处理为引用内容的ID 默认为true
  • containsAttribute默认为false,http请求时为高级选项,为true时content.attribute为内容扩展数据map(字段编码,value)
  • orderField 排序字段,【score:评分,comments:评论数,clicks:点击数,collections收藏数,publishDate:发布日期,updateDate:更新日期,checkDate:审核日期】,默认置顶级别倒序、发布日期按orderType排序
  • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
  • firstResult:开始位置,从1开始
  • pageIndex:页码,firstResult不存在时有效
  • pageSize:每页条数
  • maxResults:最大结果数

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表
    • id : id
    • title : title 标题
    • userId : user id 发布用户ID
    • deptId : dept id 发布用户部门ID
    • checkUserId : check user id 审核用户ID
    • categoryId : category id 分类ID
    • modelId : model id 模型ID
    • parentId : parent id 父内容ID
    • quoteContentId : quote content id 引用内容ID
    • copied : copied 转载
    • author : author 作者
    • editor : editor 编辑
    • onlyUrl : external link 外链
    • hasImages : has images 拥有图片列表
    • hasFiles : has files 拥有附件列表
    • hasProducts : has products 拥有产品列表
    • hasStatic : has static file 静态化
    • url : url 链接地址
    • description : description 描述
    • tagIds : tag ids 多个标签id
    • cover : cover 封面图
    • childs : childs 子内容数
    • scores : total scores 总分数
    • scoreUsers : score users 评分用户数
    • score : score 分数
    • comments : comments 评论数
    • clicks : clicks 点击数
    • collections : collections 收藏数
    • publishDate : publish date 发布日期
    • expiryDate : expiry date 过期日期
    • checkDate : check date 审核日期
    • updateUserId : update user id 更新用户id
    • updateDate : update date 更新日期
    • createDate : create date 创建日期
    • sort : top 置顶级别
    • status : status(0:Draft,1:Published,2:Pending,3:Rejected) 状态(0:草稿,1:已发布,2:待审核,3:驳回)
使用示例

<@cms.contentList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentList>

  <script>
    $.getJSON('${site.dynamicPath}api/directive/cms/contentList?pageSize=10', function(data){    
      console.log(data.page.totalCount);
    });
    </script>
 
contentProduct 产品查询指令

参数列表

  • id:内容id,结果返回object
    • id : id
    • contentId : content

      内容

    • userId : upload user id

      上传用户id

    • cover : cover

      封面图

    • title : title

      标题

    • price : price

      价格

    • minQuantity : min quantity

      最小购买数量

    • maxQuantity : max quantity

      最大购买数量

    • inventory : inventory

      库存

    • sales : sales

      销量

  • absoluteURL:cover处理为绝对路径 默认为 true
  • ids:多个内容id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
使用示例

<@cms.contentProduct id=1>${object.title}</@cms.contentProduct>

<@cms.contentProduct ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.contentProduct>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/contentProduct?id=1', function(data){    
     console.log(data.title);
   });
   </script>
 
contentProductList 产品列表查询指令

参数列表

  • contentId:内容id
  • userId:发布产品用户id
  • title:标题
  • startPrice:开始价格
  • endPrice:结束价格
  • absoluteURL:封面图处理为绝对路径 默认为true
  • orderField 排序字段,【price:价格,inventory:库存,sales:销量】,默认置顶id按orderType排序
  • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
  • pageIndex:页码
  • pageSize:每页条数

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表
    • id : id
    • contentId : content

      内容

    • userId : upload user id

      上传用户id

    • cover : cover

      封面图

    • title : title

      标题

    • price : price

      价格

    • minQuantity : min quantity

      最小购买数量

    • maxQuantity : max quantity

      最大购买数量

    • inventory : inventory

      库存

    • sales : sales

      销量

使用示例

<@cms.contentProductList contentId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentProductList>

 <script>
  $.getJSON('${site.dynamicPath}api/directive/cms/contentProductList?contentId=1&pageSize=10', function(data){    
    console.log(data.page.totalCount);
  });
  </script>
 
contentQuoteList 内容引用列表查询指令

参数列表

  • quoteId:引用内容id

返回结果:

  • list:List类型 查询结果实体列表
    • id : id
    • title : title 标题
    • userId : user id 发布用户ID
    • deptId : dept id 发布用户部门ID
    • checkUserId : check user id 审核用户ID
    • categoryId : category id 分类ID
    • modelId : model id 模型ID
    • parentId : parent id 父内容ID
    • quoteContentId : quote content id 引用内容ID
    • copied : copied 转载
    • author : author 作者
    • editor : editor 编辑
    • onlyUrl : external link 外链
    • hasImages : has images 拥有图片列表
    • hasFiles : has files 拥有附件列表
    • hasProducts : has products 拥有产品列表
    • hasStatic : has static file 静态化
    • url : url 链接地址
    • description : description 描述
    • tagIds : tag ids 多个标签id
    • cover : cover 封面图
    • childs : childs 子内容数
    • scores : total scores 总分数
    • scoreUsers : score users 评分用户数
    • score : score 分数
    • comments : comments 评论数
    • clicks : clicks 点击数
    • collections : collections 收藏数
    • publishDate : publish date 发布日期
    • expiryDate : expiry date 过期日期
    • checkDate : check date 审核日期
    • updateUserId : update user id 更新用户id
    • updateDate : update date 更新日期
    • createDate : create date 创建日期
    • sort : top 置顶级别
    • status : status(0:Draft,1:Published,2:Pending,3:Rejected) 状态(0:草稿,1:已发布,2:待审核,3:驳回)
使用示例

<@cms.contentQuoteList contentId=1 pageSize=10><#list list as a>${a.title}<#sep>,</#list></@cms.contentQuoteList>

 <script>
  $.getJSON('${site.dynamicPath}api/directive/cms/contentQuoteList?contentId=1', function(data){    
    console.log(data);
  });
  </script>
 
contentRelatedList 内容推荐列表查询指令

参数列表

  • contentId:内容id
  • relatedContentId:被推荐内容id
  • relationType:关系类型
  • relation:关系
  • orderField:排序字段,【clicks:点击数】,默认排序正序、id正序
  • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
  • pageIndex:页码
  • pageSize:每页条数

返回结果

  • page:
    • DEFAULT_PAGE_SIZE : 默认每页数据条数
    • MAX_PAGE_SIZE : 最大每页数据条数
    • totalCount : total count

      总数量

    • pageSize : page size

      每页数量

    • firstResult : first result offset

      当前开始位置

    • pageIndex : current page index

      当前页面

    • totalPage : total page

      总页数

    • list : result list

      结果列表

  • page.list:List类型 查询结果实体列表
    • id : id
    • contentId : content id 内容id
    • relationType : relation type 关系类型
    • relation : relation 关系
    • relatedContentId : related content id 推进内容id
    • userId : related user id 推进用户id
    • url : url 链接地址
    • title : title 标题
    • description : description 描述
    • sort : sort 排序
使用示例

<@cms.contentRelatedList contentId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentRelatedList>

 <script>
  $.getJSON('${site.dynamicPath}api/directive/cms/contentRelatedList?contentId=1&pageSize=10', function(data){    
    console.log(data.page.totalCount);
  });
  </script>
 
dictionary 数据字典查询指令

参数列表

  • id:值,结果返回object
    • name : name

      名称

    • childDepth : child depth

      子级深度

  • ids:多个值,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
使用示例

<@cms.dictionary id='data'>${object.name}</@cms.dictionary>

<@cms.dictionary values='data,data2'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.dictionary>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/dictionary?dictionaryId=data&value=1', function(data){    
     console.log(data.name);
   });
   </script>
 
dictionaryData 数据字典数据查询指令

参数列表

  • dictionaryId:数据字典id
  • value 值,结果返回object
    • parentValue : parent value

      父节点值

    • text : text

      文本

    • sort : sort

      排序

  • values 多个值,逗号或空格间隔,当value为空时生效,结果返回map(id,object)
使用示例

<@cms.dictionaryData dictionaryId='data' value='1'>${object.text}</@cms.dictionaryData>

<@cms.dictionaryData dictionaryId values='1,2,3'><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.dictionaryData>

  <script>
   $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryData?dictionaryId=data&value=1', function(data){    
     console.log(data.text);
   });
   </script>
 
dictionaryDataList 数据字典数据列表

参数列表

  • dictionaryId:字典id,为空时返回空结果
  • parentValue:父节点值

返回结果

  • list:List类型 查询结果实体列表
    • parentValue : parent value

      父节点值

    • text : text

      文本

    • sort : sort

      排序

使用示例

<@cms.dictionaryDataList dictionaryId='data'><#list list as a>${a.text}<#sep>,</#list></@cms.dictionaryDataList>

<script>
 $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryDataList?dictionaryId=1&parentValue=text', function(data){
   console.log(data);
 });
 </script>
 
dictionaryExclude 数据字典排除规则查询指令

参数列表

  • dictionaryId:数据字典id
  • excludeDictionaryId 排除的字典,结果返回object
    • excludeDictionaryIds 多个排除的字典,逗号或空格间隔,当excludeDictionaryId为空时生效,结果返回map(id,object)
    使用示例

    <@cms.dictionaryExclude dictionaryId='data' excludeDictionaryId='data1'>${object.id.excludeDictionaryId}</@cms.dictionaryExclude>

    <@cms.dictionaryExclude dictionaryId='data' excludeDictionaryIds='data1,data2'><#list map as k,v>${k}:${v.id.excludeDictionaryId}<#sep>,</#list></@cms.dictionaryExclude>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExclude?dictionaryId=data&value=1', function(data){    
         console.log(data.id.excludeDictionaryId);
       });
       </script>
     
    dictionaryExcludeList 数据字典数据列表

    参数列表

    • dictionaryId:字典id
    • excludeDictionaryId:排除数据字典id

    返回结果

    • list:List类型 查询结果实体列表
      使用示例

      <@cms.dictionaryExcludeList dictionaryId='data'><#list list as a>${a.id.excludeDictionaryId}<#sep>,</#list></@cms.dictionaryExcludeList>

      <script>
      $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExcludeList?dictionaryId=1&parentValue=text', function(data){
        console.log(data);
      });
      </script>
       
      dictionaryExcludeValue 数据字典排除值查询指令

      参数列表

      • dictionaryId:数据字典id
      • excludeDictionaryId:排除的字典
      • value 字典值,结果返回object
        • excludeValues : exclude values

          排除的值

      • values 多个的字典值,逗号或空格间隔,当value为空时生效,结果返回map(id,object)
      使用示例

      <@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' value='data1'>${object.excludeValues}</@cms.dictionaryExcludeValue>

      <@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' values='1,2'><#list map as k,v>${k}:${v.excludeValues}<#sep>,</#list></@cms.dictionaryExcludeValue>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExcludeValue?dictionaryId=data&excludeDictionaryId=data1&value=1', function(data){    
           console.log(data.excludeValues);
         });
         </script>
       
      dictionaryList 数据字典列表

      参数列表

      • name:字典名称
      • pageIndex:页码
      • pageSize:每页条数

      返回结果

      • page:
        • DEFAULT_PAGE_SIZE : 默认每页数据条数
        • MAX_PAGE_SIZE : 最大每页数据条数
        • totalCount : total count

          总数量

        • pageSize : page size

          每页数量

        • firstResult : first result offset

          当前开始位置

        • pageIndex : current page index

          当前页面

        • totalPage : total page

          总页数

        • list : result list

          结果列表

      • page.list:List类型 查询结果实体列表
        • name : name

          名称

        • childDepth : child depth

          子级深度

      使用示例

      <@cms.dictionaryList name='data'><#list page.list as a>${a.name}<#sep>,</#list></@cms.dictionaryList>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryList?name=data', function(data){    
         console.log(data.page.totalCount);
       });
       </script>
       
      editorHistory 正文历史查询指令

      参数列表

      • id:id,结果返回object
        • id : id
        • itemType : item type 项目类型
        • itemId : item id 项目id
        • fieldName : field name 字段名
        • createDate : create date 创建日期
        • userId : user id 用户
        • text : content text 正文内容
      • ids: 多个id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
      使用示例

      <@cms.editorHistory id=1>${object.text}</@cms.editorHistory>

      <@cms.editorHistory ids=1,2,3><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.editorHistory>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/editorHistory?id=1&appToken=接口访问授权Token', function(data){    
           console.log(data.text);
         });
         </script>
       
      editorHistoryList 内容正文历史列表查询指令

      参数列表

      • itemType:项目类型
      • itemId:项目id
      • fieldName:字段名
      • userId:用户id
      • orderType:排序类型,【asc:正序,desc:倒序】,默认为发布日期倒序
      • pageIndex:页码
      • pageSize:每页条数

      返回结果page子属性:

      • page:
        • DEFAULT_PAGE_SIZE : 默认每页数据条数
        • MAX_PAGE_SIZE : 最大每页数据条数
        • totalCount : total count

          总数量

        • pageSize : page size

          每页数量

        • firstResult : first result offset

          当前开始位置

        • pageIndex : current page index

          当前页面

        • totalPage : total page

          总页数

        • list : result list

          结果列表

      • page.list:List类型 查询结果实体列表
        • id : id
        • itemType : item type 项目类型
        • itemId : item id 项目id
        • fieldName : field name 字段名
        • createDate : create date 创建日期
        • userId : user id 用户
        • text : content text 正文内容
      使用示例

      <@cms.editorHistoryList contentId=1 fieldName='text' pageSize=10><#list page.list as a>${a.text}<#sep>,</#list></@cms.editorHistoryList>

       <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/editorHistoryList?contentId=1&fieldName='text'&pageSize=10&appToken=接口访问授权Token', function(data){    
          console.log(data.page.totalCount);
        });
        </script>
       
      facetSearch 内容列表查询指令

      参数列表

        返回结果

        • page 分面搜索结果
          • facetMap : facet result map(field,(value,count))

            分面搜索结果(字段名,(值,结果总数))

        • page.list:List类型 查询结果实体列表
          • id : id
          • title : title 标题
          • userId : user id 发布用户ID
          • deptId : dept id 发布用户部门ID
          • checkUserId : check user id 审核用户ID
          • categoryId : category id 分类ID
          • modelId : model id 模型ID
          • parentId : parent id 父内容ID
          • quoteContentId : quote content id 引用内容ID
          • copied : copied 转载
          • author : author 作者
          • editor : editor 编辑
          • onlyUrl : external link 外链
          • hasImages : has images 拥有图片列表
          • hasFiles : has files 拥有附件列表
          • hasProducts : has products 拥有产品列表
          • hasStatic : has static file 静态化
          • url : url 链接地址
          • description : description 描述
          • tagIds : tag ids 多个标签id
          • cover : cover 封面图
          • childs : childs 子内容数
          • scores : total scores 总分数
          • scoreUsers : score users 评分用户数
          • score : score 分数
          • comments : comments 评论数
          • clicks : clicks 点击数
          • collections : collections 收藏数
          • publishDate : publish date 发布日期
          • expiryDate : expiry date 过期日期
          • checkDate : check date 审核日期
          • updateUserId : update user id 更新用户id
          • updateDate : update date 更新日期
          • createDate : create date 创建日期
          • sort : top 置顶级别
          • status : status(0:Draft,1:Published,2:Pending,3:Rejected) 状态(0:草稿,1:已发布,2:待审核,3:驳回)
        使用示例
          <@cms.facetSearch word='cms' pageSize=10> 
          <p> category: <#list page.facetMap.categoryId as k,v><@cms.category id=k>${object.name}</@cms.category>(${v})</#list></p>
          <p> model: <#list page.facetMap.modelId as k,v><@cms.model id=k>${object.name}</@cms.model>(${v})</#list></p>
          <#list page.list as a><p>${a.title}</p></#list>
          </@cms.facetSearch>
         
          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/facetSearch?word=cms&pageSize=10', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
         
        model 页面片段数据查询指令

        参数列表

        • id:内容模型id,结果返回object
          • id : id
          • parentId : parent id

            父id

          • name : name

            名称

          • searchableModel : searchable model

            可搜索模型

          • templatePath : static template path

            静态化模型路径

          • contentPath : content path

            内容访问路径

          • editorType : editor type

            编辑器类型

          • coverWidth : cover width

            封面图宽度

          • coverHeight : cover height

            封面图高度

          • hasChild : has child

            外链

          • onlyUrl : extend link

          • hasImages : has image list

            有用图片列表

          • hasFiles : has file list

            拥有文件列表

          • hasProducts : has product list

            拥有图片列表

          • searchable : text searchable

            正文可搜索

          • fieldList : field list

            字段列表

          • requiredFieldList : required field list

            必填字段列表

          • fieldTextMap : field text map

            字段文本

          • extendList : extend field list

            扩展字段列表

          • relatedList : related list

            推荐列表

        • ids: 多个内容模型id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.model id='article'>${object.name}</@cms.model>

        <@cms.model ids='article,link,picture'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.model>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/model?id=article', function(data){    
             console.log(data.name);
           });
           </script>
         
        modelList 内容模型列表查询指令

        参数列表

        • parentId:父内容模型id
        • queryAll:查询所有模型,parentId为空时有效,【true,false】,默认false
        • hasChild:拥有子模型,【true,false】
        • onlyUrl:外链,【true,false】
        • hasImages:拥有图片列表,【true,false】
        • hasFiles:拥有文件列表,【true,false】

        返回结果

        • list:List类型 查询结果实体列表
          • id : id
          • parentId : parent id

            父id

          • name : name

            名称

          • searchableModel : searchable model

            可搜索模型

          • templatePath : static template path

            静态化模型路径

          • contentPath : content path

            内容访问路径

          • editorType : editor type

            编辑器类型

          • coverWidth : cover width

            封面图宽度

          • coverHeight : cover height

            封面图高度

          • hasChild : has child

            外链

          • onlyUrl : extend link

          • hasImages : has image list

            有用图片列表

          • hasFiles : has file list

            拥有文件列表

          • hasProducts : has product list

            拥有图片列表

          • searchable : text searchable

            正文可搜索

          • fieldList : field list

            字段列表

          • requiredFieldList : required field list

            必填字段列表

          • fieldTextMap : field text map

            字段文本

          • extendList : extend field list

            扩展字段列表

          • relatedList : related list

            推荐列表

        使用示例

        <@cms.modelList><#list page.list as a>${a.name}<#sep>,</#list></@cms.modelList>

         <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/modelList', function(data){    
            console.log(data.page.totalCount);
          });
          </script>
         
        place 推荐位查询指令

        参数列表

        • id:推荐位id,结果返回object
          • id : id
          • path : place path 推荐位路径
          • userId : user id 创建用户id
          • checkUserId : check user id 审核用户id
          • itemType : item type 数据项类型
          • itemId : item id 数据项id
          • title : title 标题
          • url : url 地址
          • description : description 描述
          • cover : cover 封面图
          • createDate : create date 创建日期
          • publishDate : publish date 发布日期
          • expiryDate : expiry date 过期日期
          • status : status(0:Draft,1:Published,2:Pending) 状态(0:草稿,1:已发布,2:待审核,3:已下架)
          • clicks : clicks 点击数
          • maxClicks : max clicks 最大点击数
        • absoluteURL:url处理为绝对路径 默认为 true
        • containsAttribute:默认为false,为true时object.attribute为推荐位扩展数据map(字段编码,value)
        • ids: 多个推荐位id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.place id=1>${object.title}</@cms.place>

        <@cms.place ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.place>

         <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/place?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.title);
          });
          </script>
         
        placeList 推荐位列表查询指令

        参数列表

        • path:页面片段路径
        • userId:发布用户id
        • advanced:开启高级选项, 默认为false
        • status:高级选项:数据状态,【0:操作,1:已发布,2:待审核】
        • disabled:高级选项:禁用状态,默认为false
        • startPublishDate:起始发布日期,【2020-01-01 23:59:59】,【2020-01-01】
        • endPublishDate:终止发布日期,高级选项禁用时不能超过现在,【2020-01-01 23:59:59】,【2020-01-01】
        • itemType:数据项类型,【content:内容,category:分类,custom:自定义】
        • itemId:数据项id
        • absoluteURL:url、封面图处理为绝对路径 默认为true
        • containsAttribute:默认为false,http请求时为高级选项,为true时place.attribute为推荐位扩展数据map(字段编码,value)
        • orderField 排序字段,【createDate:创建日期,clicks:点击数】,默认发布日期按orderType排序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • path : place path 推荐位路径
          • userId : user id 创建用户id
          • checkUserId : check user id 审核用户id
          • itemType : item type 数据项类型
          • itemId : item id 数据项id
          • title : title 标题
          • url : url 地址
          • description : description 描述
          • cover : cover 封面图
          • createDate : create date 创建日期
          • publishDate : publish date 发布日期
          • expiryDate : expiry date 过期日期
          • status : status(0:Draft,1:Published,2:Pending) 状态(0:草稿,1:已发布,2:待审核,3:已下架)
          • clicks : clicks 点击数
          • maxClicks : max clicks 最大点击数
        使用示例

        <@cms.placeList path='/1.html' pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.placeList>

         <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/placeList?path=/1.html&pageSize=10&appToken=接口访问授权Token', function(data){    
            console.log(data.page.totalCount);
          });
          </script>
         
        search 内容列表查询指令

        参数列表

        • word:搜索词,多个搜索词时取并集结果
        • exclude:排除词汇
        • tagIds:多个标签id,多个标签时取并集结果
        • userId:用户id
        • parentId:父内容id
        • categoryId:分类id
        • containChild:包含子分类,当categoryId不为空时有效
        • categoryIds:多个分类id,当categoryId为空时有效
        • modelIds:多个模型id
        • extendsValues 多个全文搜索字段值,格式:[字段编码]:字段值],例如:extendsValues='isbn:value1,unicode:value2'
        • dictionaryValues 多个字典搜索字段值,只有数据字典父级值时包含所有子级结果,格式:[字段编码]_[字段值],例如:dictionaryValues='extend1_value1,extend1_value2'
        • dictionaryUnion 取数据字典并集结果,dictionaryUnion不为空时有效,【true,false】,默认为交集结果
        • highlight:高亮关键词,【true,false】,默认为false,启用高亮后, 标题、作者、编辑、描述字段应该加?no_esc以使高亮html生效,cms会自动对原值有进行html安全转义
        • preTag:高亮前缀,启用高亮时有效,默认为"<B>"
        • postTag:高亮后缀,启用高亮时有效,默认为"</B>"
        • projection:投影结果,【true,false】,默认为false
        • phrase:精确搜索,【true,false】,默认为false
        • fields:搜索字段,【title:标题, author:作者, editor:编辑, description:描述, text:正文,files:附件】
        • containsAttribute默认为false,http请求时为高级选项,为true时content.attribute为内容扩展数据map(字段编码,value)
        • startPublishDate:起始发布日期,【2000-01-01 23:59:59】,【2000-01-01】
        • endPublishDate:终止发布日期,【2000-01-01 23:59:59】,【2000-01-01】
        • orderField 排序字段,【clicks:点击数倒序,score:分数倒序,publishDate:发布日期倒序,collections:收藏数倒叙,minPrice:最低价格,maxPrice:最高价格,extend.sort1-extend.sort10]:扩展字段排序标志】,默认相关度倒序
        • pageIndex:页码
        • pageSize:每页条数
        • maxResults:最大结果数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • title : title 标题
          • userId : user id 发布用户ID
          • deptId : dept id 发布用户部门ID
          • checkUserId : check user id 审核用户ID
          • categoryId : category id 分类ID
          • modelId : model id 模型ID
          • parentId : parent id 父内容ID
          • quoteContentId : quote content id 引用内容ID
          • copied : copied 转载
          • author : author 作者
          • editor : editor 编辑
          • onlyUrl : external link 外链
          • hasImages : has images 拥有图片列表
          • hasFiles : has files 拥有附件列表
          • hasProducts : has products 拥有产品列表
          • hasStatic : has static file 静态化
          • url : url 链接地址
          • description : description 描述
          • tagIds : tag ids 多个标签id
          • cover : cover 封面图
          • childs : childs 子内容数
          • scores : total scores 总分数
          • scoreUsers : score users 评分用户数
          • score : score 分数
          • comments : comments 评论数
          • clicks : clicks 点击数
          • collections : collections 收藏数
          • publishDate : publish date 发布日期
          • expiryDate : expiry date 过期日期
          • checkDate : check date 审核日期
          • updateUserId : update user id 更新用户id
          • updateDate : update date 更新日期
          • createDate : create date 创建日期
          • sort : top 置顶级别
          • status : status(0:Draft,1:Published,2:Pending,3:Rejected) 状态(0:草稿,1:已发布,2:待审核,3:驳回)
        使用示例

        <@cms.search word='cms' pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.search>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/search?word=cms&pageSize=10', function(data){
            console.log(data.page.totalCount);
          });
          </script>
         
        survey 调查问卷查询指令

        参数列表

        • id:调查问卷id,结果返回object
          • id : id
          • userId : user id 发布用户id
          • surveyType : survey type(survey,exam) 问卷类型(survey:问卷,exam:考试)
          • title : title 标题
          • description : description 描述
          • votes : votes 投票次数
          • startDate : start date 开始日期
          • endDate : end date 结束日期
          • allowAnonymous : allow anonymous 允许匿名
          • createDate : create date 创建日期
        • ids: 多个调查问卷id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.survey id=1>${object.title}</@cms.survey>

        <@cms.survey ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.survey>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/survey?id=1', function(data){    
           console.log(data.title);
         });
         </script>
         
        surveyList 问卷调查列表查询指令

        参数列表

        • userId:发布用户id
        • surveyType:问卷类型,【exam:考试,survey:问卷调查】
        • startStartDate:起始开始日期,【2020-01-01 23:59:59】,【2020-01-01】
        • endStartDate:终止开始日期,【2020-01-01 23:59:59】,【2020-01-01】
        • startEndDate:起始结束日期,【2020-01-01 23:59:59】,【2020-01-01】
        • endEndDate:终止结束日期,【2020-01-01 23:59:59】,【2020-01-01】
        • title:标题
        • disabled:已禁用,默认为false
        • orderField 排序字段,【votes:参与人数,startDate:开始日期,endDate:结束日期,createTime:创建日期】,默认id按orderType排序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • userId : user id 发布用户id
          • surveyType : survey type(survey,exam) 问卷类型(survey:问卷,exam:考试)
          • title : title 标题
          • description : description 描述
          • votes : votes 投票次数
          • startDate : start date 开始日期
          • endDate : end date 结束日期
          • allowAnonymous : allow anonymous 允许匿名
          • createDate : create date 创建日期
        使用示例

        <@cms.surveyList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyList>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/surveyList?pageSize=10', function(data){    
           console.log(data.page.totalCount);
         });
         </script>
         
        surveyQuestion 调查问卷问题查询指令

        参数列表

        • id:调查问卷问题id,结果返回object
          • id : id
          • surveyId : survey id

            问卷id

          • title : title

            标题

          • score : score

            分数

          • questionType : question type[radio,select,checkbox,text,file,picture]

            问题类型[radio:单选,select:下拉选择,checkbox:复选框,text:文字,file:文件,picture:图片]

          • cover : cover

            图片

          • answer : answer

            答案

          • sort : sort

            排序

        • ids: 多个调查问卷问题id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        • absoluteURL:封面图处理为绝对路径 默认为true
        • advanced:开启高级选项, 默认为false
        使用示例

        <@cms.surveyQuestion id=1>${object.title}</@cms.surveyQuestion>

        <@cms.surveyQuestion ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.surveyQuestion>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestion?id=1&appToken=接口访问授权Token', function(data){    
           console.log(data.title);
         });
         </script>
         
        surveyQuestionItem 调查问卷问题选项查询指令

        参数列表

        • id:调查问卷问题id,结果返回object
          • id : id
          • questionId : question id

            问题id

          • votes : votes

            票数

          • title : title

            标题

          • sort : sort

            排序

        • ids: 多个调查问卷问题id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.surveyQuestionItem id=1>${object.title}</@cms.surveyQuestionItem>

        <@cms.surveyQuestionItem ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.surveyQuestionItem>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionItem?id=1', function(data){    
           console.log(data.title);
         });
         </script>
         
        surveyQuestionItemList 问卷调查问题选项列表查询指令

        参数列表

        • questionId:问题id
        • orderField:排序字段,【votes:得票数量】,默认sort按顺序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • questionId : question id

            问题id

          • votes : votes

            票数

          • title : title

            标题

          • sort : sort

            排序

        使用示例

        <@cms.surveyQuestionItemList questionId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyQuestionItemList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionItemList?questionId=1&pageSize=10', function(data){    
          console.log(data.page.totalCount);
        });
        </script>
         
        surveyQuestionList 问卷调查问题列表查询指令

        参数列表

        • surveyId:问卷调查id
        • questionTypes 多个问题类型,【radio:单选,select:下拉选择,checkbox:复选框,text:文字,file:文件,picture:图片】
        • absoluteURL:封面图处理为绝对路径 默认为true
        • advanced:开启高级选项, 默认为false
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为排序顺序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • surveyId : survey id

            问卷id

          • title : title

            标题

          • score : score

            分数

          • questionType : question type[radio,select,checkbox,text,file,picture]

            问题类型[radio:单选,select:下拉选择,checkbox:复选框,text:文字,file:文件,picture:图片]

          • cover : cover

            图片

          • answer : answer

            答案

          • sort : sort

            排序

        使用示例

        <@cms.surveyQuestionList surveyId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyQuestionList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionList?surveyId=1&pageSize=10', function(data){    
          console.log(data.page.totalCount);
        });
        </script>
         
        tag 标签查询指令

        参数列表

        • id:标签id,结果返回object
          • id : id
          • name : name

            名称

          • typeId : type id

            类型id

          • searchCount : search count

            搜索次数

        • ids: 多个标签id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.tag id=1>${object.name}</@cms.tag>

        <@cms.tag ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.tag>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/tag?id=1', function(data){    
          console.log(data.name);
        });
        </script>
         
        tagList 标签列表查询指令

        参数列表

        • typeId:标签类型id
        • name:标签名
        • advanced:开启高级选项, 默认为false
        • orderField:高级选项:排序字段,【searchCount:搜索次数】,默认searchCount按orderType排序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • name : name

            名称

          • typeId : type id

            类型id

          • searchCount : search count

            搜索次数

        使用示例

        <@cms.tagList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.tagList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/tagList?pageSize=10', function(data){    
          console.log(data.page.totalCount);
        });
        </script>
         
        tagType 标签类型查询指令

        参数列表

        • id:标签类型id,结果返回object
          • id : id
          • name : name

            名称

          • count : tag count

            标签个数

        • ids: 多个标签类型id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.tagType id=1>${object.name}</@cms.tagType>

        <@cms.tagType ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.tagType>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/tagType?id=1', function(data){    
          console.log(data.name);
        });
        </script>
         
        tagTypeList 标签类型列表查询指令

        参数列表

        • name:标签名
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • name : name

            名称

          • count : tag count

            标签个数

        使用示例

        <@cms.tagTypeList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.tagTypeList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/tagTypeList?pageSize=10', function(data){    
         console.log(data.page.totalCount);
        });
        </script>
         
        userCollection 用户收藏查询指令

        参数列表

        • userId:用户id
        • contentId:内容id,结果返回object
          • id : id
          • createDate : create date 创建日期
        • contentIds 多个项目id,逗号或空格间隔,当contentId为空时生效,结果返回map(contentId,object)
        使用示例

        <@cms.userCollection userId=1 contentId=1>${object.scores}</@cms.userCollection>

        <@cms.userCollection userId=1 contentIds='1,2,3'><#list map as k,v>${k}:${v.contentId}<#sep>,</#list></@cms.userCollection>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userCollection?id=1', function(data){    
          console.log(data.scores);
        });
        </script>
         
        userCollectionList 用户评分列表查询指令

        参数列表

        • userId:用户id
        • contentId:内容id
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • createDate : create date 创建日期
        使用示例

        <@cms.userCollectionList userId=1 pageSize=10><#list page.list as a>${a.scores}<#sep>,</#list></@cms.userCollectionList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userCollectionList?userId=1&pageSize=10', function(data){    
         console.log(data.page.totalCount);
        });
        </script>
         
        userScore 用户评分查询指令

        参数列表

        • userId:用户id
        • itemType:项目类型
        • itemId:项目id,结果返回object
          • id : id
          • score : score 分数
          • ip : ip
          • createDate : create date 创建日期
        • itemIds 多个项目id,逗号或空格间隔,当itemId为空时生效,结果返回map(itemId,object)
        使用示例

        <@cms.userScore userId=1 itemType="content" itemId=1>${object.scores}</@cms.userScore>

        <@cms.userScore userId=1 itemType="content" itemIds='1,2,3'><#list map as k,v>${k}:${v.scores}<#sep>,</#list></@cms.userScore>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userScore?id=1', function(data){    
          console.log(data.scores);
        });
        </script>
         
        userScoreList 用户评分列表查询指令

        参数列表

        • userId:用户id
        • itemType:项目类型
        • itemId:项目id
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • score : score 分数
          • ip : ip
          • createDate : create date 创建日期
        使用示例

        <@cms.userScoreList userId=1 pageSize=10><#list page.list as a>${a.scores}<#sep>,</#list></@cms.userScoreList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userScoreList?userId=1&pageSize=10', function(data){    
         console.log(data.page.totalCount);
        });
        </script>
         
        userSurvey 用户问卷回答查询指令

        参数列表

        • userId:用户id
        • surveyId:问卷id,结果返回object
          • id : id
          • anonymous : anonymous 匿名用户
          • score : score 分数
          • ip : ip
          • createDate : create date 创建日期
        • surveyIds 多个问卷id,逗号或空格间隔,当surveyId为空且userId不为空时生效,结果返回map(surveyId,object)
        • userIds 多个用户id,逗号或空格间隔,当userId为空且surveyId不为空时生效,结果返回map(userId,object)
        使用示例

        <@cms.userSurvey id=1>${object.score}</@cms.userSurvey>

        <@cms.userSurvey ids='1,2,3'><#list map as k,v>${k}:${v.score}<#sep>,</#list></@cms.userSurvey>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userSurvey?id=1&appToken=接口访问授权Token', function(data){    
          console.log(data.score);
        });
        </script>
         
        userSurveyList 用户问卷回答列表查询指令

        参数列表

        • userId:用户id
        • surveyId:问卷id
        • orderField:排序字段,【score:评分,createDate:创建日期】,默认createDate按orderType排序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • anonymous : anonymous 匿名用户
          • score : score 分数
          • ip : ip
          • createDate : create date 创建日期
        使用示例

        <@cms.userSurveyList userId=1 pageSize=10><#list page.list as a>${a.score}<#sep>,</#list></@cms.userSurveyList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyList?userId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
         console.log(data.page.totalCount);
        });
        </script>
         
        userSurveyQuestion 用户问卷问题解答查询指令

        参数列表

        • userId:用户id
        • questionId:问题id,结果返回object
          • id : id
          • surveyId : survey id

            问卷调查id

          • answer : answer

            答案

          • score : score

            分数

          • createDate : create date

            创建日期

        • questionIds 多个问题id,逗号或空格间隔,当questionId为空且userId不为空时生效,结果返回map(questionId,object)
        • userIds 多个用户id,逗号或空格间隔,当userId为空且questionId不为空时生效,结果返回map(userId,object)
        使用示例

        <@cms.userSurveyQuestion id=1>${object.answer}</@cms.userSurveyQuestion>

        <@cms.userSurveyQuestion ids='1,2,3'><#list map as k,v>${k}:${v.answer}<#sep>,</#list></@cms.userSurveyQuestion>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyQuestion?id=1&appToken=接口访问授权Token', function(data){    
          console.log(data.answer);
        });
        </script>
         
        userSurveyQuestionList 用户问卷问题解答列表查询指令

        参数列表

        • userId:用户id
        • questionId:问题id
        • surveyId:问卷id
        • orderField:排序字段,【score:评分,createDate:创建日期】,默认createDate按orderType排序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • surveyId : survey id

            问卷调查id

          • answer : answer

            答案

          • score : score

            分数

          • createDate : create date

            创建日期

        使用示例

        <@cms.userSurveyQuestionList userId=1 pageSize=10><#list page.list as a>${a.answer}<#sep>,</#list></@cms.userSurveyQuestionList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyQuestionList?userId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
         console.log(data.page.totalCount);
        });
        </script>
         
        userVote 用户投票查询指令

        参数列表

        • userId:用户id
        • voteId:投票id,结果返回object
          • id : id
          • anonymous : anonymous 匿名用户
          • itemId : item id 选项id
          • ip : ip
          • createDate : create date 创建日期
        • voteIds 多个投票id,逗号或空格间隔,当voteId为空时生效,结果返回map(voteId,object)
        使用示例

        <@cms.userVote id=1>${object.itemId}</@cms.userVote>

        <@cms.userVote ids='1,2,3'><#list map as k,v>${k}:${v.itemId}<#sep>,</#list></@cms.userVote>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userVote?id=1', function(data){    
          console.log(data.itemId);
        });
        </script>
         
        userVoteList 用户投票列表查询指令

        参数列表

        • userId:用户id
        • voteId:投票id
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为创建日期倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • anonymous : anonymous 匿名用户
          • itemId : item id 选项id
          • ip : ip
          • createDate : create date 创建日期
        使用示例

        <@cms.userVoteList userId=1 pageSize=10><#list page.list as a>${a.ip}<#sep>,</#list></@cms.userVoteList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/userVoteList?userId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
         console.log(data.page.totalCount);
        });
        </script>
         
        vote 投票查询指令

        参数列表

        • id:投票id,结果返回object
          • id : id
          • startDate : start date 开始日期
          • endDate : end date 结束日期
          • votes : votes 投票次数
          • title : title 标题
          • description : description 描述
          • allowAnonymous : allow anonymous 允许匿名
          • createDate : create date 创建日期
        • ids: 多个投票id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.vote id=1>${object.title}</@cms.vote>

        <@cms.vote ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.vote>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/vote?id=1', function(data){    
          console.log(data.title);
        });
        </script>
         
        voteItem 投票选项查询指令

        参数列表

        • id:投票选项id,结果返回object
          • id : id
          • voteId : vote id

            投票id

          • title : title

            标题

          • votes : votes

            票数

          • sort : sort

            排序

        • ids: 多个投票选项id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.voteItem id=1>${object.title}</@cms.voteItem>

        <@cms.voteItem ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.voteItem>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/voteItem?id=1', function(data){    
          console.log(data.title);
        });
        </script>
         
        voteItemList 投票选项列表查询指令

        参数列表

        • voteId:投票id
        • orderField:排序字段,【votes:投票人数,sort:排序正序】,默认sort按正序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • voteId : vote id

            投票id

          • title : title

            标题

          • votes : votes

            票数

          • sort : sort

            排序

        使用示例

        <@cms.voteItemList voteId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.voteItemList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/voteItemList?voteId=1&pageSize=10', function(data){    
        console.log(data.page.totalCount);
        });
        </script>
         
        voteList 投票列表查询指令

        参数列表

        • startStartDate:起始开始日期,【2020-01-01 23:59:59】,【2020-01-01】
        • endStartDate:终止开始日期,【2020-01-01 23:59:59】,【2020-01-01】
        • startEndDate:起始结束日期,【2020-01-01 23:59:59】,【2020-01-01】
        • endEndDate:终止结束日期,【2020-01-01 23:59:59】,【2020-01-01】
        • advanced:开启高级选项, 默认为false
        • disabled:高级选项:禁用状态,默认为false
        • title:高级选项:标题
        • orderField:排序字段,【startDate:开始日期,endDate:结束,votes:投票人数,createDate:创建日期】,默认id按orderType排序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • startDate : start date 开始日期
          • endDate : end date 结束日期
          • votes : votes 投票次数
          • title : title 标题
          • description : description 描述
          • allowAnonymous : allow anonymous 允许匿名
          • createDate : create date 创建日期
        使用示例

        <@cms.voteList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.voteList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/voteList?pageSize=10', function(data){    
        console.log(data.page.totalCount);
        });
        </script>
         
        word 搜索词查询指令

        参数列表

        • id:搜索词id,结果返回object
          • id : id
          • name : name 名称
          • searchCount : search count 搜索次数
          • hidden : hidden 隐藏
          • ip : ip
          • createDate : create date 创建日期
        • ids: 多个搜索词id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
        使用示例

        <@cms.word id=1>${object.name}</@cms.word>

        <@cms.word ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.word>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/word?id=1&appToken=接口访问授权Token', function(data){    
          console.log(data.name);
        });
        </script>
         
        wordList 用户投票列表查询指令

        参数列表

        • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
        • endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
        • advanced:开启高级选项, 默认为false
        • hidden:高级选项:禁用状态,默认为false
        • name:高级选项:名称
        • orderField 高级选项:排序,【searchCount:搜索次数,createDate:创建日期,id:id】默认为searchCount按orderType排序
        • orderType:排序类型,【asc:正序,desc:倒序】,默认为创建日期倒序
        • pageIndex:页码
        • pageSize:每页条数

        返回结果

        • page:
          • DEFAULT_PAGE_SIZE : 默认每页数据条数
          • MAX_PAGE_SIZE : 最大每页数据条数
          • totalCount : total count

            总数量

          • pageSize : page size

            每页数量

          • firstResult : first result offset

            当前开始位置

          • pageIndex : current page index

            当前页面

          • totalPage : total page

            总页数

          • list : result list

            结果列表

        • page.list:List类型 查询结果实体列表
          • id : id
          • name : name 名称
          • searchCount : search count 搜索次数
          • hidden : hidden 隐藏
          • ip : ip
          • createDate : create date 创建日期
        使用示例

        <@cms.wordList userId=1 pageSize=10><#list page.list as a>${a.ip}<#sep>,</#list></@cms.wordList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/wordList?userId=1&pageSize=10', function(data){    
        console.log(data.page.totalCount);
        });
        </script>
         
        wordload 工作量查询指令

        参数列表

        • status:多个内容状态,【0:草稿,1:已发布,2:待审核,3:驳回】
        • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
        • endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
        • workloadType:工作量类型【dept:部门,user:用户】,默认部门
        • dateField:日期字段【createDate:创建日期,publishDate:发布日期】,默认创建日期

        返回结果

        • list:List类型 查询结果实体列表
          使用示例

          <@cms.wordload pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.wordload>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/cms/wordload?pageSize=10&appToken=接口访问授权Token', function(data){    
              console.log(data.page.totalCount);
            });
            </script>
           
          logLoginList 登录日志列表查询指令

          参数列表

          • userId:用户id
          • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • channel:登录渠道
          • result:登录结果,【true,false】
          • name:用户名
          • ip:IP
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • name : name

              用户名

            • userId : user id

              用户id

            • ip : ip
            • channel : login channel

              登录渠道

            • result : login result

              登录结果

            • createDate : login date

              登录日期

            • errorPassword : error password

              错误密码

          使用示例

          <@log.loginList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.loginList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/log/loginList?pageSize=10&appToken=接口访问授权Token', function(data){    
               console.log(data.page.totalCount);
             });
             </script>
           
          logOperate 操作日志查询指令

          参数列表

          • id:日志id,结果返回object
            • id : id
            • userId : user id

              用户id

            • deptId : dept id

              部门id

            • channel : channel

              渠道

            • operate : operate channel

              操作渠道

            • ip : ip
            • createDate : operate date

              操作日期

            • content : content

              内容

          • ids: 多个日志id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@log.operate id=1>${object.content}</@log.operate>

          <@log.operate ids='1,2,3'><#list map as k,v>${k}:${v.content}<#sep>,</#list></@log.operate>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/log/operate?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.content);
          });
          </script>
           
          logOperateList 操作日志列表查询指令

          参数列表

          • channel:渠道
          • operate:操作编码
          • userId:用户ID
          • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • content:操作内容
          • name:用户名
          • ip:IP
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • userId : user id

              用户id

            • deptId : dept id

              部门id

            • channel : channel

              渠道

            • operate : operate channel

              操作渠道

            • ip : ip
            • createDate : operate date

              操作日期

            • content : content

              内容

          使用示例

          <@log.operateList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.operateList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/log/OperateList?pageSize=10&appToken=接口访问授权Token', function(data){    
               console.log(data.page.totalCount);
             });
             </script>
           
          logTask 任务计划日志查询指令

          参数列表

          • id:日志id,结果返回object
            • id : id
            • taskId : task id

              任务id

            • begintime : begin time

              开始日期

            • endtime : end timeb

              结束日期

            • success : success

              执行成功

            • result : result

              执行结果

          • ids: 多个日志id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@log.task id=1>${object.result}</@log.task>

          <@log.task ids='1,2,3'><#list map as k,v>${k}:${v.result}<#sep>,</#list></@log.task>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/log/task?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.result);
          });
          </script>
           
          logTaskList 任务计划日志列表查询指令

          参数列表

          • taskId:任务计划ID
          • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • success:执行结果,【true,false】
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • taskId : task id

              任务id

            • begintime : begin time

              开始日期

            • endtime : end timeb

              结束日期

            • success : success

              执行成功

            • result : result

              执行结果

          使用示例

          <@log.taskList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.taskList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/log/TaskList?pageSize=10&appToken=接口访问授权Token', function(data){    
              console.log(data.page.totalCount);
            });
            </script>
           
          logUploadList 文件上传日志列表查询指令

          参数列表

          • fileTypes:文件类型,【image,video,audio,document,other】
          • image:是否图片,【true,false】
          • userId:用户ID
          • channel:渠道
          • privatefile:私有文件,【true,false】,默认false
          • originalName:原文件名
          • filePath:文件路径
          • orderField:排序字段,[createDate:创建日期,fileSize:文件大小],默认ID倒序
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • userId : user id 用户id
            • channel : operate channel 操作渠道
            • originalName : original name 原文件名
            • privatefile : privatefile 私有文件
            • fileType : file type 文件类型
            • fileSize : file size 文件大小
            • width : image width 图片宽度
            • height : image height 图片高度
            • ip : ip
            • createDate : upload date 上传日期
            • filePath : file path 文件路径
          使用示例

          <@log.uploadList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.uploadList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/log/UploadList?pageSize=10&appToken=接口访问授权Token', function(data){    
               console.log(data.page.totalCount);
             });
             </script>
           
          oauthList 账户查询指令

          参数列表 返回结果

          • list登录渠道名称列表
          使用示例

          <@oauth.list><#list list as a>${a}<#sep>,</#list></@oauth.list>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/oauth/list', function(data){
              console.log(data);
            });
            </script>
           
          sysApp 应用查询指令

          参数列表

          • id:应用id,结果返回object
            • id : id
            • channel : channel

              渠道

            • appKey : app key

              授权key

            • appSecret : app secret

              授权密钥

            • authorizedApis : authorized apis

              授权接口

            • expiryMinutes : expiry minutes

              过期分钟数

          • ids: 多个应用id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.app id=1>${object.channel}</@sys.app>

          <@sys.app ids='1,2,3'><#list map as k,v>${k}:${v.channel}<#sep>,</#list></@sys.app>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/app?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.channel);
          });
          </script>
           
          sysAppClient 应用客户端查询指令

          参数列表

          • id:客户端id,结果返回object
            • id : id
            • channel : channel

              渠道

            • uuid : uuid

              唯一id

            • userId : user id

              用户id

            • clientVersion : client version

              客户端版本

            • lastLoginDate : last login date

              上次登录日期

            • lastLoginIp : last login ip

              上次登录ip

            • createDate : create date

              创建日期

          • ids: 多个客户端id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.appClient id=1>${object.clientVersion}</@sys.appClient>

          <@sys.appClient ids='1,2,3'><#list map as k,v>${k}:${v.clientVersion}<#sep>,</#list></@sys.appClient>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/appClient?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.clientVersion);
          });
          </script>
           
          sysAppClientList 应用客户端列表查询指令

          参数列表

          • advanced:开启高级选项, 默认为false
          • disabled:高级选项:禁用状态,【true,false】,默认false
          • channel:渠道
          • userId:用户id
          • startLastLoginDate:起始上次登录日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endLastLoginDate:终止上次登录日期,【2020-01-01 23:59:59】,【2020-01-01】
          • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderField 排序字段,[lastLoginDate:上次登录日期,createDate:创建日期],默认创建日期倒序
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • channel : channel

              渠道

            • uuid : uuid

              唯一id

            • userId : user id

              用户id

            • clientVersion : client version

              客户端版本

            • lastLoginDate : last login date

              上次登录日期

            • lastLoginIp : last login ip

              上次登录ip

            • createDate : create date

              创建日期

          使用示例

          <@sys.appClientList pageSize=10><#list page.list as a>${a.uuid}<#sep>,</#list></@sys.appClientList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/appClientList?pageSize=10&appToken=接口访问授权Token', function(data){    
              console.log(data.page.totalCount);
            });
            </script>
           
          sysAppList 应用列表查询指令

          参数列表

          • channel:渠道
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • channel : channel

              渠道

            • appKey : app key

              授权key

            • appSecret : app secret

              授权密钥

            • authorizedApis : authorized apis

              授权接口

            • expiryMinutes : expiry minutes

              过期分钟数

          使用示例

          <@sys.appList pageSize=10><#list page.list as a>${a.channel}<#sep>,</#list></@sys.appList>

          sysAppTokenList 应用授权列表查询指令

          参数列表

          • appId:应用id
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • authToken : auth token

              授权验证码

            • appId : app id

              应用id

            • createDate : create date

              创建日期

            • expiryDate : expiry date

              过期日期

          使用示例

          <@sys.appTokenList pageSize=10><#list page.list as a>${a.authToken}<#sep>,</#list></@sys.appTokenList>

          sysAuthorized 角色url授权查询指令

          参数列表

          • roleIds:多个角色id
          • url url,roleIds、url都存在时,结果返回truefalse,表示这些角色是否拥有该url的权限
          • urls 多个url,当roleIds存在,且url为空时生效,结果返回map(url,truefalse)
          使用示例

          <@sys.authorized roleIds='1,2,3' url='cmsContent/list'>${object}</@sys.authorized>

          <@sys.authorized roleIds='1,2,3' urls='cmsContent/list,cmsCategory/list'><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.authorized>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/authorized?roleIds=1,2,3&url=cmsContent/list&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          sysClusterList 系统节点列表查询指令

          参数列表

          • startHeartbeatDate:起始心跳日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endHeartbeatDate:终止心跳日期,【2020-01-01 23:59:59】,【2020-01-01】
          • master:是否主节点,【true,false】,默认false
          • orderField:排序字段,[createDate:上次登录日期,heartbeatDate:创建日期,id],默认id倒序
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • uuid : uuid
            • createDate : startup date

              启动日期

            • heartbeatDate : heart beat date

              上次心跳日期

            • master : master

              管理节点

            • cmsVersion : cms version

              cms版本

            • revision : revision

              修改版本

          使用示例

          <@sys.clusterList pageSize=10><#list page.list as a>${a.uuid}<#sep>,</#list></@sys.clusterList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/clusterList?pageSize=10', function(data){    
              console.log(data.page.totalCount);
            });
            </script>
           
          sysConfig 配置查询指令

          参数列表

          • code:配置编码,结果返回object
            • code : code

              编码

            • description : description

              描述

            • customed : customed

              自定义

          使用示例

          <@sys.config code='site'>${object.description}</@sys.config>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/config?code=site&appToken=接口访问授权Token', function(data){    
            console.log(data.description);
          });
          </script>
           
          sysConfigData 配置数据查询指令

          参数列表

          • code:配置编码,结果返回object
            • id : id
            • data : config data

              配置数据

          • codes:多个配置编码,结果返回map(id,object)
          使用示例

          <@sys.configData code='site'>${object.register_url}</@sys.configData>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/configData?code=site&appToken=接口访问授权Token', function(data){    
           console.log(data.register_url);
          });
          </script>
           
          sysConfigFieldList 配置数据字段列表查询指令

          参数列表

          • code:配置编码

          返回结果

          • list:List类型 查询结果实体列表
            • id : id
            • required : required 必填
            • searchable : searchable 可搜索
            • sortable : sortable field 排序字段
            • maxlength : max length 最大长度
            • width : image width 图片宽度
            • height : image height 图片高度
            • name : name 名称
            • description : description 描述
            • inputType : input type 表单类型
            • defaultValue : default value 默认值
            • dictionaryId : dictionary id 数据字典
            • multiple : multiple 多选
            • sort : sort 排序
          使用示例

          <@sys.configFieldList pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.configFieldList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/configFieldList?appToken=接口访问授权Token', function(data){    
              console.log(data);
            });
            </script>
           
          sysConfigList 配置列表查询指令

          返回结果

          • list:List类型 查询结果实体列表
            • code : code

              编码

            • description : description

              描述

            • customed : customed

              自定义

          使用示例

          <@sys.configList><#list list as a>${a.code}<#sep>,</#list></@sys.configList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/configList?appToken=接口访问授权Token', function(data){    
              console.log(data);
            });
            </script>
           
          sysDept 部门查询指令

          参数列表

          • id:部门id,结果返回object
            • id : id
            • name : name

              名称

            • code : code

              编码

            • parentId : parent id

              父部门id

            • description : description

              描述

            • userId : manage user id

              负责用户id

            • maxSort : max content sort

              最大内容置顶级别

            • ownsAllCategory : owns all category

              拥有全部分类

            • ownsAllPage : owns all page

              拥有全部页面

            • ownsAllConfig : owns all config

              拥有全部配置

          • ids: 多个部门id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.dept id=1>${object.name}</@sys.dept>

          <@sys.dept ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.dept>

          <script>
          $.getJSON('//sys.publicsys.com/api/directive/sys/dept?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.name);
          });
          </script>
           
          sysDeptItem 数据授权查询指令

          参数列表

          • deptId:部门id
          • ItemId 分类id,deptId、ItemId都存在时,结果返回truefalse,表示该部门是否拥有该分类下内容的数据权限
          • ItemIds 多个分类id,当deptId存在,且ItemId为空时生效,结果返回map(分类id,truefalse)
          使用示例

          <@sys.deptItem deptId=1 ItemId=1>${object}</@sys.deptItem>

          <@sys.deptItem deptId=1 ItemIds=1,2,3><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.deptItem>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/deptItem?deptId=1&ItemId=1&appToken=接口访问授权Token', function(data){
              console.log(data);
            });
            </script>
           
          sysDeptItemList 部门数据授权列表查询指令

          参数列表

          • deptId:部门id
          • itemType:项目类型
          • itemId:项目id
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
          使用示例

          <@sys.deptCategoryList deptId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.deptCategoryList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/deptCategoryList?deptId=1&pageSize=10&appToken=接口访问授权Token', function(data){
              console.log(data.page.totalCount);
            });
            </script>
           
          sysDeptList 部门列表查询指令

          参数列表

          • parentId:父部门id
          • userId:负责人id
          • name:名称
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • name : name

              名称

            • code : code

              编码

            • parentId : parent id

              父部门id

            • description : description

              描述

            • userId : manage user id

              负责用户id

            • maxSort : max content sort

              最大内容置顶级别

            • ownsAllCategory : owns all category

              拥有全部分类

            • ownsAllPage : owns all page

              拥有全部页面

            • ownsAllConfig : owns all config

              拥有全部配置

          使用示例

          <@sys.deptList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.deptList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/deptList?pageSize=10&appToken=接口访问授权Token', function(data){    
              console.log(data.page.totalCount);
            });
            </script>
           
          sysDomain 域名查询指令

          参数列表

          • id:域名,结果返回object
            • name : domain name

              域名

            • siteId : site id

              站点id

            • wild : wild

              通配域名

            • multiple : multiple site

              站群

            • path : root template path

              模板根目录

          • ids: 多个域名,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.domain id='www.publiccms.com'>${object.name}</@sys.domaing>

          <@sys.domain ids='www.publiccms.com,www.sanluan.com'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.domain>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/domain?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.name);
          });
          </script>
           
          sysDomainList 域名列表查询指令

          参数列表

          • advanced:开启高级选项, 默认为false
          • siteId:高级选项:站点id
          • wild:高级选项:通配域名,【true,false】
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • name : domain name

              域名

            • siteId : site id

              站点id

            • wild : wild

              通配域名

            • multiple : multiple site

              站群

            • path : root template path

              模板根目录

          使用示例

          <@sys.domainList deptId=1 pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.domainList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/domainList?pageSize=10&appToken=接口访问授权Token', function(data){    
              console.log(data.page.totalCount);
            });
            </script>
           
          sysExtendFieldList 扩展字段列表查询指令

          参数列表

          • extendId:扩展id
          • inputType:多个输入框类型【text:输入框,number:数字,textarea:多行文本,file:文件,image:图片,video:视频,password:密码,editor:百度编辑器,ckeditor:CK编辑器,tinymce:TinyMCE编辑器,date:日期,datetime:时间,color:颜色,alphaColor:带透明度的颜色,template:模板路径,boolean:是否,user:用户,dept:部门,content:内容,category:分类,dictionary:数据字典,categoryType:分类类型,tagType:标签类型,vote:投票,survey:调查问卷,tag:标签】
          • searchable:可搜索,【true,false】

          返回结果

          • list:List类型 查询结果实体列表
            • id : id
            • required : required 必填
            • searchable : searchable 可搜索
            • sortable : sortable field 排序字段
            • maxlength : max length 最大长度
            • width : image width 图片宽度
            • height : image height 图片高度
            • name : name 名称
            • description : description 描述
            • inputType : input type 表单类型
            • defaultValue : default value 默认值
            • dictionaryId : dictionary id 数据字典
            • multiple : multiple 多选
            • sort : sort 排序
          使用示例

          <@sys.extendFieldList deptId=1 pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.extendFieldList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/extendFieldList?extendId=1&appToken=接口访问授权Token', function(data){
              console.log(data);
            });
            </script>
           
          lock 锁查询指令

          参数列表

          • itemType:项目类型
          • itemId:项目id,结果返回object
            • id : id
            • userId : user id

              用户id

            • count : locked count

              锁定次数

            • createDate : create date

              创建日期

          • itemIds 多个项目id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.lock id=1>${object.count}</@sys.lock>

          <@sys.lock ids='1,2,3'><#list map as k,v>${k}:${v.count}<#sep>,</#list></@sys.lock>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/lock?id=1', function(data){    
            console.log(data.count);
          });
          </script>
           
          sysModule 模块查询指令

          参数列表

          • id:模块id,结果返回object
            • id : id
            • url : url

              地址

            • authorizedUrl : authorized url

              授权访问地址

            • attached : attached

              附加信息

            • parentId : parent module id

              父模块id

            • menu : is menu

              是否菜单

            • sort : sort

              排序

          • ids: 多个模块id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.module id='page'>${object.url}</@sys.module>

          <@sys.module ids='page,develop'><#list map as k,v>${k}:${v.url}<#sep>,</#list></@sys.module>

          <script>
          $.getJSON('//sys.publicsys.com/api/directive/sys/module?id=page&appToken=接口访问授权Token', function(data){    
            console.log(data.url);
          });
          </script>
           
          sysModuleLang 模块语言查询指令

          参数列表

          • moduleId:模块id,结果返回object
            • id : id
            • url : url

              地址

            • authorizedUrl : authorized url

              授权访问地址

            • attached : attached

              附加信息

            • parentId : parent module id

              父模块id

            • menu : is menu

              是否菜单

            • sort : sort

              排序

          • lang:语言【zh:中文,en:英语,ja:日语】
          使用示例

          <@sys.moduleLang moduleId='page' lang='zh'>${object}</@sys.moduleLang>

          <script>
          $.getJSON('//sys.publicsys.com/api/directive/sys/moduleLang?moduleId=page&lang=zh', function(data){    
           console.log(data);
          });
          </script>
           
          sysModuleList 模块列表查询指令

          参数列表

          • advanced:开启高级选项, 默认为false
          • menu:高级选项:是否菜单,【true,false】
          • parentId:父模块id
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • url : url

              地址

            • authorizedUrl : authorized url

              授权访问地址

            • attached : attached

              附加信息

            • parentId : parent module id

              父模块id

            • menu : is menu

              是否菜单

            • sort : sort

              排序

          使用示例

          <@sys.moduleList parentId='page' pageSize=10><#list page.list as a>${springMacroRequestContext.getMessage('menu.'+a.id)}<#sep>,</#list></@sys.moduleList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/moduleList?parentId=page&pageSize=10&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          sysRecord 自定义记录查询写入指令

          参数列表

          • code:记录编码,结果返回object
          • data:记录数据,不为空时记录该数据
            • id : id
            • data : record data 记录数据
            • createDate : create date 创建日期
            • updateDate : update date 更新日期
          • codes:多个记录编码,结果返回map(id,object)
          使用示例

          <@sys.record code='site' data='data'>${object.data}</@sys.record>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/record?code=site&data=data&appToken=接口访问授权Token', function(data){    
           console.log(data.data);
          });
          </script>
           
          sysRecordList 自定义记录列表查询指令

          参数列表

          • code:编码
          • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate:终止创建日期,高级选项禁用时不能超过现在,【2020-01-01 23:59:59】,【2020-01-01】
          • orderField:排序字段,【updateDate:更新日期】默认创建日期倒序
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • list:List类型 查询结果实体列表
            • id : id
            • data : record data 记录数据
            • createDate : create date 创建日期
            • updateDate : update date 更新日期
          使用示例

          <@sys.recordList><#list list as a>${a.data}<#sep>,</#list></@sys.recordList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/recordList?appToken=接口访问授权Token', function(data){    
              console.log(data);
            });
            </script>
           
          sysRole 角色查询指令

          参数列表

          • id:角色id,结果返回object
            • id : id
            • name : name

              名称

            • ownsAllRight : owns all right

              拥有全部功能权限

            • showAllModule : show all modules

              显示全部模块

          • ids: 多个角色id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.role id=1>${object.name}</@sys.role>

          <@sys.role ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.role>

          <script>
          $.getJSON('//sys.publicsys.com/api/directive/sys/role?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.name);
          });
          </script>
           
          sysRoleList 角色列表查询指令

          参数列表

          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • name : name

              名称

            • ownsAllRight : owns all right

              拥有全部功能权限

            • showAllModule : show all modules

              显示全部模块

          使用示例

          <@sys.roleList deptId=1 pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.roleList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/roleList?deptId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          sysRoleModule 角色模块授权查询指令

          参数列表

          • roleIds:多个角色id
          • moduleId 模块id,roleIds、moduleId都存在时,结果返回truefalse,表示这些角色是否拥有该模块的数据权限
          • moduleIds 多个模块id,当roleIds存在,且moduleId为空时生效,结果返回map(模块id,truefalse)
          使用示例

          <@sys.roleModule roleIds='1,2,3' modelId='page'>${object}</@sys.roleModule>

          <@sys.roleModule roleIds='1,2,3' modelIds='page,content'><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.roleModule>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/sys/roleModule?roleIds=1,2,3&modelId=page&appToken=接口访问授权Token', function(data){
            console.log(data);
          });
          </script>
           
          sysRoleModuleList 角色模块映射列表查询指令

          参数列表

          • roleId:角色id
          • moduleId:模块id
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
          使用示例

          <@sys.roleModuleList roleId=1 pageSize=10><#list page.list as a>${a.id.roleId}<#sep>,</#list></@sys.roleModuleList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/sysDeptCategoryList?roleId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          sysRoleUserList 角色用户列表查询指令

          参数列表

          • roleId:角色id
          • userId:用户id
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
          使用示例

          <@sys.roleUserList roleId=1 pageSize=10><#list page.list as a>${a.id.roleId}<#sep>,</#list></@sys.roleUserList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/roleUserList?roleId=1&pageSize=10&appToken=接口访问授权Token', function(data){
             console.log(data.page.totalCount);
           });
           </script>
           
          sysSite 站点查询指令

          参数列表

          • id:站点id,结果返回object
            • id : id
            • parentId : parent site id

              父站点id

            • directory : directory

              目录

            • name : name

              名称

            • useStatic : use static

              启用静态化

            • sitePath : site url

              静态站点地址

            • useSsi : use SSI

              启用服务器端包含

            • dynamicPath : dynamic site url

              动态站点地址

          • ids: 多个站点id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.site id=1>${object.name}</@sys.site>

          <@sys.site ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.site>

          <script>
          $.getJSON('//sys.publicsys.com/api/directive/sys/site?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.name);
          });
          </script>
           
          sysSiteList 站点列表查询指令

          参数列表

          • advanced:开启高级选项, 默认为false
          • disabled:高级选项:已禁用,【true,false】
          • parentId:父站点id
          • name:名称
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • parentId : parent site id

              父站点id

            • directory : directory

              目录

            • name : name

              名称

            • useStatic : use static

              启用静态化

            • sitePath : site url

              静态站点地址

            • useSsi : use SSI

              启用服务器端包含

            • dynamicPath : dynamic site url

              动态站点地址

          使用示例

          <@sys.siteList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.siteList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/siteList?pageSize=10&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          sysTask 任务计划查询指令

          参数列表

          • id:任务计划id,结果返回object
            • id : id
            • name : name 名称
            • status : status(0:ready,1:running,2:paused,3:error) 状态(0:就绪,1:执行中,2:暂停,3:错误)
            • multiNode : multi-node execution 多节点运行
            • cronExpression : cron expression 计划表达式
            • description : description 描述
            • filepath : file path 文件路径
            • updateDate : update date 更新日期
          • ids: 多个任务计划id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@sys.task id=1>${object.name}</@sys.task>

          <@sys.task ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.task>

          <script>
          $.getJSON('//sys.publicsys.com/api/directive/sys/task?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.name);
          });
          </script>
           
          sysTaskList 任务计划列表查询指令

          参数列表

          • status:状态【0:就绪,1:执行中,2:暂停,3:错误】
          • startUpdateDate:起始更新日期,【2020-01-01 23:59:59】,【2020-01-01】
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • name : name 名称
            • status : status(0:ready,1:running,2:paused,3:error) 状态(0:就绪,1:执行中,2:暂停,3:错误)
            • multiNode : multi-node execution 多节点运行
            • cronExpression : cron expression 计划表达式
            • description : description 描述
            • filepath : file path 文件路径
            • updateDate : update date 更新日期
          使用示例

          <@sys.taskList deptId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.taskList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/taskList?deptId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          sysUser 用户查询指令

          参数列表

          • replaceSensitive:替换敏感词, 默认为true
          • id:用户id,结果返回object
            • id : id
            • name : name 用户名
            • weakPassword : weak password 弱密码
            • nickname : nickname 昵称
            • cover : cover 封面图
            • deptId : dept id 部门id
            • contentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)
            • roles : role ids 角色id
            • email : email 邮件地址
            • emailChecked : email checked 已验证邮件
            • superuser : super user 管理员
            • disabled : disabled 已禁用p
            • lastLoginDate : last login date 上次登录日期
            • lastLoginIp : last login ip 上次登录ip
            • loginCount : login count 登录次数
            • registeredDate : register date 注册日期
          • ids: 多个用户id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          • absoluteURL:cover处理为绝对路径 默认为 true
          使用示例

          <@sys.user id=1>${object.name}</@sys.user>

          <@sys.user ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.user>

          <script>
          $.getJSON('//sys.publicsys.com/api/directive/sys/user?id=1&appToken=接口访问授权Token', function(data){    
            console.log(data.name);
          });
          </script>
           
          sysUserList 用户列表查询指令

          参数列表

          • advanced:开启高级选项, 默认为false
          • replaceSensitive:替换敏感词, 默认为true
          • disabled:高级选项:已禁用,【true,false】, 默认为false
          • deptId:部门id
          • startRegisteredDate:起始注册日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endRegisteredDate:终止注册日期,【2020-01-01 23:59:59】,【2020-01-01】
          • startLastLoginDate:起始上次登录日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endLastLoginDate:终止上次登录日期,【2020-01-01 23:59:59】,【2020-01-01】
          • superuser:管理员,【true,false】
          • emailChecked:邮箱已验证,【true,false】
          • name:昵称、用户名、邮箱
          • orderField 排序字段,【lastLoginDate:上次登录日期,loginCount:登录次数,registeredDate:注册日期,followers:粉丝数】,默认创建日期按orderType排序
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • name : name 用户名
            • weakPassword : weak password 弱密码
            • nickname : nickname 昵称
            • cover : cover 封面图
            • deptId : dept id 部门id
            • contentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)
            • roles : role ids 角色id
            • email : email 邮件地址
            • emailChecked : email checked 已验证邮件
            • superuser : super user 管理员
            • disabled : disabled 已禁用p
            • lastLoginDate : last login date 上次登录日期
            • lastLoginIp : last login ip 上次登录ip
            • loginCount : login count 登录次数
            • registeredDate : register date 注册日期
          使用示例

          <@sys.userList deptId=1 pageSize=10><#list page.list as a>${a.nickname}<#sep>,</#list></@sys.userList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/userList?deptId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          sysUserTokenList 用户登录授权列表查询指令

          参数列表

          • userId:用户id
          • channel:渠道
          • orderField:排序字段,【expiryDate:过期日期,createDate:创建日期,】,默认创建日期按orderType排序
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • authToken : auth token

              授权码

            • userId : user id

              用户id

            • channel : channel

              渠道

            • createDate : create date

              授权日期

            • expiryDate : expiry date

              过期日期

            • loginIp : login ip

              登录ip

          使用示例

          <@sys.userTokenList userId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.userTokenList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/sys/userTokenList?pageSize=10&authToken=用户登录Token&authUserId=用户id', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          clearLog 日志清理指令

          参数列表

          • clearDate:起始发布日期,【2020-01-01 23:59:59】,【2020-01-01】,默认3个月前

          返回结果

          • resultmap类型
          • result.loginLog:登录日志删除数量
          • result.operateLog:操作日志删除数量
          • result.taskLog:任务计划日志删除数量
          使用示例

          <@task.clearLog><#list result as k,v>${k}:${v}<#sep>,</#list></@task.clearLog>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/task/clearLog?appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          indexContent 重建内容索引指令

          参数列表

          • id:内容id,ids为空时有效
          • ids:多个内容id

          使用示例

          <@task.indexContent id=1><</@task.indexContent>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/task/indexContent?id=1&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          publishCategory 发布分类静态页面指令

          参数列表

          • id:分类id
          • ids:多个分类id
          • pageIndex:当前页码,默认值1
          • totalPage:最大页码,为空时则只生成当前页

          返回结果

          • mapmap类型,键值内容id,值为生成结果
          使用示例

          <@task.publishCategory id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishCategory>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/task/publishCategory?id=1&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          publishContent 发布分类静态页面指令

          参数列表

          • id:内容id
          • ids:多个内容id,id为空时有效

          返回结果

          • mapmap类型,键值内容id,值为生成结果
          使用示例

          <@task.publishContent id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishContent>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/task/publishContent?id=1&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          publishPage 页面静态化指令

          参数列表

          • path:页面路径,默认值"/"

          返回结果

          • mapmap类型,键值页面路径,值为生成结果
          使用示例

          <@task.publishPage><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishPage>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/task/publishPage?path=&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          publishPlace 页面片段静态化指令

          参数列表

          • path:页面路径,默认值"/"

          返回结果

          • mapmap类型,键值页面路径,值为生成结果
          使用示例

          <@task.publishPlace><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishPlace>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/task/publishPlace?path=&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          createCategoryFile 创建分类静态文件指令

          参数列表

          • id:分类id
          • templatePath:模板路径
          • filePath:静态文件路径
          • pageIndex:当前页码,默认为1
          • totalPage:最大页码,为空时则只生成当前页

          返回结果

          • url:静态文件路径
          使用示例

          <@tools.createCategoryFile id=1 templatePath='category.html' filePath='category/'+1+'.html'>${url}</@tools.createCategoryFile>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/createCategoryFile?id=1&templatePath=category.html&filePath=category/1.html&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          createContentFile 创建内容静态文件指令

          参数列表

          • id:内容id
          • templatePath:模板路径
          • filePath:静态文件路径
          • pageIndex:当前页码,默认为1

          返回结果

          • url:静态文件路径
          使用示例

          <@tools.createContentFile id=1 templatePath='content.html' filePath='content/'+1+'.html'>${url}</@tools.createContentFile>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/tools/createContentFile?id=1&templatePath=content.html&filePath=content/1.html&appToken=接口访问授权Token', function(data){    
            console.log(data);
          });
          </script>
           
          createLock 创建锁指令

          参数列表

          • itemType:锁定项目类型
          • itemId:锁定项目id
          • userId:锁定用户id
          • counter:计数,默认值0:

          返回结果

          • object:
            • id : id
            • userId : user id

              用户id

            • count : locked count

              锁定次数

            • createDate : create date

              创建日期

          使用示例

          <@tools.createLock itemType='content' itemId='1' userId='1'>${url}</@tools.createLock>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/tools/createLock?itemType=content&itemId=1&userId=1&appToken=接口访问授权Token', function(data){    
            console.log(data);
          });
          </script>
           
          createTemplateFile 创建静态文件指令

          参数列表

          • templatePath:模板路径
          • filePath:静态文件路径
          • pageIndex:当前页码,默认为1
          • parameters:参数map

          返回结果

          • url:静态文件路径
          使用示例

          <@tools.createTemplateFile templatePath='template.html' filePath='page/'+1+'.html' parameters={"parameter1","value1"}>${url}</@tools.createTemplateFile>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/tools/createTemplateFile?id=1&templatePath=template.html&filePath=page/1.html&parameters.parameter1=value1&appToken=接口访问授权Token', function(data){    
            console.log(data);
          });
          </script>
           
          csrfToken 防跨站请求伪造token指令

          参数列表

          • admin:是否后台,默认值false:

          返回结果

          • 打印token值
          使用示例

          <input type="hidden" name="_csrf" value="<@tools.csrfToken/>"/>

          disk 磁盘空间与路径指令

          返回结果

          • freeSpace:空白空间
          • totalSpace:总空间
          • usableSpace:可用空间
          • rootPath:绝对路径
          使用示例

          <@tools.disk>${freeSpace}</@tools.disk>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/tools/disk?appToken=接口访问授权Token', function(data){
           console.log(data);
          });
          </script>
           
          diyMetadata diy元数据获取指令

          参数列表

          • itemType:元数据类型,【region,layout,module】
          • itemId:元数据id

          返回结果

          • object:diy元数据region:
            • id : id
            • categoryType : category type

              分类类型

            • name : name

              名称

            ,layout:
            • id : id
            • region : region

              区域

            • name : name

              名称

            • template : template

              模板

            • style : style

              样式

            ,module:
            • id : id
            • region : region

              区域

            • name : name

              名称

            • clone : clone

              复制

            • cover : cover

              封面图

            • place : place path

              页面片段

            • fragment : fragment path

              模板片段

            • filePath : file path

              文件路径

          使用示例

          <@tools.diyMetadata itemType='region' itemId='00000000-0000-0000-0000-000000000000'>${object.name}</@tools.diyMetadata>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/diyMetadata?itemType=region&itemId=00000000-0000-0000-0000-000000000000&appToken=接口访问授权Token', function(data){    
             console.log(data.name);
           });
           </script>
           
          diyMetadataList diy元数据列表获取指令

          参数列表

          • itemType:元数据类型,【region,layout,module】
          • region:区域id,当itemType为layout或module时有效
          • showGlobal:元数据类型,【true,false】,当itemType为layout或module时有效,默认为true:

          返回结果

          • list: diy元数据列表region:
            • id : id
            • categoryType : category type

              分类类型

            • name : name

              名称

            ,layout:
            • id : id
            • region : region

              区域

            • name : name

              名称

            • template : template

              模板

            • style : style

              样式

            ,module:
            • id : id
            • region : region

              区域

            • name : name

              名称

            • clone : clone

              复制

            • cover : cover

              封面图

            • place : place path

              页面片段

            • fragment : fragment path

              模板片段

            • filePath : file path

              文件路径

          使用示例

          <@tools.diyMetadataList itemType='region'><#list page.list as a>${a.name}<#sep>,</#list></@tools.diyMetadataList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/diyMetadataList?itemType=region&appToken=接口访问授权Token', function(data){    
             console.log(data.name);
           });
           </script>
           
          regionData diy区域数据获取指令

          参数列表

          • id:区域id
          • categoryId:分类id

          返回结果

          • object:
            • id : id
            • layoutList : layout data list

              布局列表

            • categoryLayoutMap : layout data list map

              布局数据列表哈希表

          使用示例

          <@tools.diyMetadata id='00000000-0000-0000-0000-000000000000'>${object.id}</@tools.diyMetadata>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/regionData?itemId=00000000-0000-0000-0000-000000000000&appToken=接口访问授权Token', function(data){    
             console.log(data.id);
           });
           </script>
           
          exception 异常获取指令

          返回结果

          • object:异常字符串
          使用示例

          <@tools.exception>${object}</@tools.exception>

          executeScript 脚本执行指令

          参数列表

          • command:命令【sync.bat,sync.sh,backupdb.bat,backupdb.sh】
          • parameters:参数数组

          打印执行结果

          使用示例

          <@tools.executeScript command='backupdb.bat'/>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/executeScript?command=backupdb.bat&appToken=接口访问授权Token', function(data){    
             console.log(data.id);
           });
           </script>
           
          fileBackupContent 备份文件内容获取指令

          参数列表

          • type:文件类型【file,task,template】,默认template
          • path:文件路径

          返回结果

          • object:文件内容文本
          使用示例

          <@tools.fileBackupContent type='file' path='index.html'>${object}</@tools.fileBackupContent>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/fileBackupContent?type=file&path=index.html&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          fileBackupList 文件回收站列表获取指令

          参数列表

          • type:文件类型【file,task,template】,默认template
          • path:文件路径
          • orderField: 排序类型【fileName,fileSize,modifiedDate,createDate】,默认fileName

          返回结果

          • list:文件列表
          使用示例

          <@tools.fileBackupList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileBackupList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/fileBackupList?path=/&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          fileContent 文件内容获取指令

          参数列表

          • type:文件类型【file,task,template】,默认template
          • path:文件路径

          返回结果

          • object:文件内容文本
          使用示例

          <@tools.fileContent path='index.html'>${object}</@tools.fileContent>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/fileContent?path=index.html&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          fileExists 文件是否存在指令

          参数列表

          • type:文件类型【file,task,template】,默认template
          • path:文件路径

          返回结果

          • object:boolean类型文件是否存在
          使用示例

          <@tools.fileExists type='file' path='/'><#list list as a>${a}<#sep>,</#list></@tools.fileExists>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/fileExists?type=file&path=/&appToken=接口访问授权Token', function(data){
             console.log(data);
           });
           </script>
           
          fileHistoryContent 文件修改历史内容获取指令

          参数列表

          • type:文件类型【file,task,template】,默认template
          • path:文件路径

          返回结果

          • object:文件内容文本
          使用示例

          <@tools.fileHistoryContent type='file' path='index.html/2020-01-01_01-01-000000'>${object}</@tools.fileHistoryContent>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/fileHistoryContent?type=file&path=index.html/2020-01-01_01-01-000000&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          fileHistoryList 文件修改历史列表获取指令

          参数列表

          • type:文件类型【file,task,template】,默认template
          • path:文件路径
          • orderField: 排序类型【fileName,fileSize,modifiedDate,createDate】,默认fileName

          返回结果

          • list:文件列表
          使用示例

          <@tools.fileHistoryList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileHistoryList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/fileHistoryList?path=/&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          fileList 文件列表获取指令

          参数列表

          • type:文件类型【file,task,template】,默认template
          • path:文件路径
          • orderField: 排序类型【fileName,fileSize,modifiedDate,createDate】,默认fileName

          返回结果

          • list:文件列表
          使用示例

          <@tools.fileList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/fileList?path=/&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          includeLayout 包含diy布局指令

          参数列表

          • id:布局id

          打印包含结果

          使用示例

          <@tools.includeLayout id='00000000-0000-0000-0000-000000000000'>${index},</@tools.includeLayout>

          includePlace 包含页面片段指令

          参数列表

          • path:路径

          打印包含结果

          使用示例

          <@tools.includePlace path='00000000-0000-0000-0000-000000000000'/>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/includePlace?path=00000000-0000-0000-0000-000000000000.html&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          includeRegion 包含diy区域指令

          参数列表

          • id:布局id

          打印包含结果

          使用示例

          <@tools.includeRegion id='00000000-0000-0000-0000-000000000000' categoryId=1/>

          licenseVerify 授权文件验证指令

          参数列表

          • licenseData:授权文件数据

          返回结果

          • result:验证结果,【true:验证成功,false:验证失败】
          使用示例

          <@tools.licenseVerify licenseData='content'>${url}</@tools.licenseVerify>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/tools/licenseVerify?licenseData=content', function(data){    
           console.log(data);
          });
          </script>
           
          masterSite 管理站点判断指令

          使用示例

          <@tools.masterSite>this is a master site</@tools.masterSite>

          memory 内存监控指令

          返回结果

          • freeMemory:空闲内存
          • totalMemory:总内存
          • maxMemory:最大内存
          使用示例

          <@tools.memory>${totalMemory}</@tools.memory>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/tools/memory?appToken=接口访问授权Token', function(data){    
           console.log(data);
          });
          </script>
           
          metadata 模板元数据获取指令

          参数列表

          • path:模板路径

          返回结果

          • object: 元数据
            • alias : alias

              别名

            • publishPath : static file path

              静态文件路径

            • useDynamic : allow dynamic access

              允许动态访问

            • needLogin : need login

              需要登录

            • needBody : need body field

              需要消息体

            • acceptParameters : accept parameters

              可接受参数名

            • cacheTime : cache time

              缓存时间

            • contentType : content type

              内存类型

            • extendList : extend field list

              扩展字段列表

            • parameterTypeMap : parameter type map

              参数类型表

          使用示例

          <@tools.metadata path='index.html'>${object.alias}</@tools.metadata>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/metadata?path=index.html&appToken=接口访问授权Token', function(data){    
             console.log(data.alias);
           });
           </script>
           
          placeMetadata 页面片段元数据获取指令

          参数列表

          • path:模板路径

          返回结果

          • object: 元数据
            • alias : alias

              别名

            • size : data size

              数据条数

            • adminIds : front administrator ids

              前台管理员ids

            • allowContribute : allow contribute

              允许投稿

            • allowAnonymous : allow anonymous contribute

              允许匿名投稿

            • coverWidth : cover width

              封面图宽度

            • coverHeight : cover height

              封面图高度

            • workflowId : workflow

              流程

            • acceptItemTypes : accept item types

              可以接受项目类型

            • fieldList : system field list

              系统字段列表

            • requiredFieldList : required field list

              必填字段列表

            • fieldTextMap : field text map

              字段文本哈希表

            • extendList : extend field list

              扩展字段列表

            • metadataExtendList : metadata extend field list

              元数据扩展字段列表

          使用示例

          <@tools.placeMetadata path='00000000-0000-0000-0000-000000000000'>${object.alias}</@tools.placeMetadata>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/placeMetadata?path=00000000-0000-0000-0000-000000000000.html&appToken=接口访问授权Token', function(data){    
             console.log(data.alias);
           });
           </script>
           
          sendEmail 发送邮件指令

          参数列表

          • email:多个邮件地址
          • cc:多个抄送地址
          • bcc:多个密送地址
          • title:标题
          • templatePath:内容模板路径
          • content:邮件内容,templatePath为空时有效
          • fileNames:多个附件名称
          • filePaths:多个文件路径
          • parameters:参数map

          返回结果

          • result:是否允许发送,【true,false】
          使用示例

          <@tools.sendEmail email='master@puliccms.com' title='title' content='content' parameters={"parameter1":"value1"}/>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/sendEmail?email=master@puliccms.com&title=title&content=content&parameters.parameter1=value1&appToken=接口访问授权Token', function(data){    
             console.log(data.alias);
           });
           </script>
           
          systemProperties 服务器参数指令

          返回结果

          • java.version:Java version number
          • java.vendor:Java vendor specific string
          • java.vendor.url:Java vendor URL
          • java.home:Java installation directory
          • java.class.version:Java class version number
          • java.class.path:Java classpath
          • os.name:Operating System Name
          • os.arch:Operating System Architecture
          • os.version:Operating System Version
          • file.separator:File separator (SEPARATOR on Unix)
          • path.separator:Path separator (":" on Unix)
          • line.separator:Line separator ("\n" on Unix)
          • user.name:User account name
          • user.home:User home directory
          • user.dir:User's current working directory

          使用示例

          <@tools.systemProperties>${.vars['java.version']}</@tools.systemProperties>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/systemProperties?appToken=接口访问授权Token', function(data){
             console.log(data['java.version']);
           });
           </script>
           
          templatePlaceList 模板文件页面片段列表获取指令

          参数列表

          • path:文件路径

          返回结果

          • list:文件路径列表
          使用示例

          <@tools.templatePlaceList path='index.html'><#list list as a>${a}<#sep>,</#list></@tools.templatePlaceList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/templatePlaceList?path=index.html&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          templateRegionList 模板文件页面可视化区域列表指令

          参数列表

          • path:文件路径

          返回结果

          • list:可视化区域id列表
          使用示例

          <@tools.templateRegionList path='index.html'><#list list as a>${a}<#sep>,</#list></@tools.templateRegionList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/templateRegionList?path=index.html&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          templateResult 模板渲染结果指令

          参数列表

          • parameters:参数map
          • templateContent:模板内容
          打印渲染结果

          使用示例

          <@tools.templateResult templateContent='${name}' parameters={'name':'value'}/>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/templateResult?path=$%7Bname%7D&parameters.name=value&appToken=接口访问授权Token', function(data){    
             console.log(data);
           });
           </script>
           
          templateSearchList 模板文件搜索列表指令

          参数列表

          • path:文件路径
          • word:搜索词

          返回结果

          • list:文件列表
          使用示例

          <@tools.templateSearchList path='/' word='script'><#list list as a>${a.path}<#sep>,</#list></@tools.templateSearchList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/templateSearchList?path=/&word=script&appToken=接口访问授权Token', function(data){
             console.log(data);
           });
           </script>
           
          thumb 缩略图指令

          参数列表

          • path:文件路径
          • width:宽度
          • height:高度

          打印结果文件路径

          使用示例

          <@tools.thumb path='images/logo.jpg' width=100 height=100/>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/thumb?path=images/logo.jpg&width=100&height=100&appToken=接口访问授权Token', function(data){    
             console.log(data.deviceType);
           });
           </script>
           
          userAgent user agent分析指令

          参数列表

          • userAgent:user agent,为空时取当前请求的user agent

          返回结果

          • object.ip:客户端ip
          • object.browser:浏览器
          • object.browserType:浏览器类型
          • object.browserVersion:浏览器版本
          • object.operatingSystem:操作系统
          • object.operatingSystemVersion:操作系统版本
          • object.deviceType:设备类型
          • object.userAgent:user agent
          使用示例

          <@tools.userAgent>${a.deviceType}</@tools.userAgent>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/userAgent', function(data){    
             console.log(data.deviceType);
           });
           </script>
           
          version 版本指令

          返回结果

          • cms:cms版本
          • revision:修订版
          • authorizationEdition:使用授权
          • authorizationStartDate:授权起始日期
          • authorizationEndDate:授权结束日期
          • authorizationOrganization:授权单位
          • cluster:节点id
          • master:是否管理节点【true:管理节点,false:普通节点】
          使用示例

          <@tools.version path='/'>${a.fileName}</@tools.version>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/tools/version', function(data){    
             console.log(data.cms);
           });
           </script>
           
          tradeAccount 账户查询指令

          参数列表

          • id 账户id,结果返回object
            • id : id
            • amount : amount

              金额

            • updateDate : update date

              更新日期

          • ids 多个账户id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.account id=1>${object.amount}</@trade.account>

          <@trade.account ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.account>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/trade/account?id=1&appToken=接口访问授权Token', function(data){    
               console.log(data.amount);
             });
             </script>
           
          tradeAccountHistory 账户历史查询指令

          参数列表

          • id 账户历史id,结果返回object
            • id : id
            • serialNumber : serial number

              流水号

            • accountId : account id

              账户id

            • userId : operate user id

              操作用户id

            • amountChange : amount change

              金额变动

            • amount : abmount

              金额

            • balance : balance

              余额

            • status : status(0:pend,1:pay,2:charge,3:refund)

              状态(0:待处理,1:支付,2:充值,3:退款)

            • description : description

              描述

            • createDate : create date

              创建日期

          • ids 多个账户历史id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.accountHistory id=1>${object.balance}</@trade.accountHistory>

          <@trade.accountHistory ids=1,2,3><#list map as k,v>${k}:${v.balance}<#sep>,</#list></@trade.accountHistory>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/accountHistory?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.balance);
            });
            </script>
           
          tradeAccountHistoryList 账户历史列表查询指令

          参数列表

          • accountId 账户id
          • userId 操作用户id
          • status 状态,【0:预充值,1:消费,2:充值,3:退款】
          • startCreateDate 起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate 终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType 排序类型,【asc:正序,desc:倒叙】,默认为创建日期倒叙
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • serialNumber : serial number

              流水号

            • accountId : account id

              账户id

            • userId : operate user id

              操作用户id

            • amountChange : amount change

              金额变动

            • amount : abmount

              金额

            • balance : balance

              余额

            • status : status(0:pend,1:pay,2:charge,3:refund)

              状态(0:待处理,1:支付,2:充值,3:退款)

            • description : description

              描述

            • createDate : create date

              创建日期

          使用示例

          <@trade.accountHistoryList pageSize=10><#list page.list as a>${a.amountChange}<#sep>,</#list></@trade.accountHistoryList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/trade/accountHistoryList?authToken=用户登录Token&authUserId=用户id', function(data){    
               console.log(data.page.totalCount);
             });
             </script>
           
          tradeAccountList 账户列表查询指令

          参数列表

          • orderField 排序字段,【amount:金额,updateDate:更新日期】,默认置顶id按orderType排序
          • orderType 排序类型,【asc:正序,desc:倒叙】,默认为倒叙
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • amount : amount

              金额

            • updateDate : update date

              更新日期

          使用示例

          <@trade.accountList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.accountList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/trade/accountList?pageSize=10&appToken=接口访问授权Token', function(data){    
           console.log(data.page.totalCount);
          });
          </script>
           
          TradeAddressDirective
          TradeAddressListDirective
          tradeOrder 订单查询指令

          参数列表

          • id 订单id,结果返回object
            • id : id
            • userId : user id

              用户id

            • title : title

              标题

            • amount : amount

              金额

            • paymentId : payment id

              支付订单id

            • address : address

              收货地址

            • addressee : addressee

              收件人

            • telephone : telphone

              电话

            • ip : ip
            • remark : remark

              备注

            • status : status(0:pending,1:invalid,2:paid,3:refunded,4:close)

              状态(0:待处理,1:无效订单,2:已支付,3:已退款,4:已关闭)

            • confirmed : confirmed

              是否确认

            • processed : processed

              是否处理

            • processUserId : process user id

              处理用户id

            • processInfo : process info

              处理信息

            • updateDate : update date

              更新日期

            • createDate : create date

              创建日期

            • processDate : process date

              处理日期

            • paymentDate : payment date

              付款日期

          • ids 多个订单id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.order id=1>${object.title}</@trade.order>

          <@trade.order ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@trade.order>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/order?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.title);
            });
            </script>
           
          tradeOrderHistory 订单历史查询指令

          参数列表

          • id 订单历史id,结果返回object
            • id : id
            • orderId : order id

              订单id

            • createDate : create date

              创建日期

            • operate : operate

              操作

            • content : content

              内容

          • ids 多个订单历史id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.orderHistory id=1>${object.amount}</@trade.orderHistory>

          <@trade.orderHistory ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.orderHistory>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/orderHistory?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.amount);
            });
            </script>
           
          tradeOrderHistoryList 订单历史列表查询指令

          参数列表

          • orderId 订单id
          • startCreateDate 起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate 终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType 排序类型,【asc:正序,desc:倒叙】,默认为创建日期倒叙
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • orderId : order id

              订单id

            • createDate : create date

              创建日期

            • operate : operate

              操作

            • content : content

              内容

          使用示例

          <@trade.orderHistoryList orderId=1 pageSize=10><#list page.list as a>${a.content}<#sep>,</#list></@trade.orderHistoryList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/trade/orderHistoryList?orderId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
           console.log(data.page.totalCount);
          });
          </script>
           
          tradeOrderList 订单列表查询指令

          参数列表

          • userId 用户id
          • paymentId 付款id
          • status 状态,【0:待处理,1:无效订单,2:已支付,3:已退款,4:已关闭】
          • processed 已处理,【true,false】
          • startCreateDate 起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate 终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType 排序类型,【asc:正序,desc:倒叙】,默认为发布日期倒叙
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • userId : user id

              用户id

            • title : title

              标题

            • amount : amount

              金额

            • paymentId : payment id

              支付订单id

            • address : address

              收货地址

            • addressee : addressee

              收件人

            • telephone : telphone

              电话

            • ip : ip
            • remark : remark

              备注

            • status : status(0:pending,1:invalid,2:paid,3:refunded,4:close)

              状态(0:待处理,1:无效订单,2:已支付,3:已退款,4:已关闭)

            • confirmed : confirmed

              是否确认

            • processed : processed

              是否处理

            • processUserId : process user id

              处理用户id

            • processInfo : process info

              处理信息

            • updateDate : update date

              更新日期

            • createDate : create date

              创建日期

            • processDate : process date

              处理日期

            • paymentDate : payment date

              付款日期

          使用示例

          <@trade.orderList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.orderList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/trade/orderList?pageSize=10&authToken=用户登录Token&authUserId=用户id', function(data){    
           console.log(data.page.totalCount);
          });
          </script>
           
          tradeOrderProduct 订单产品查询指令

          参数列表

          • id 订单产品id,结果返回object
            • id : id
            • orderId : order id

              订单id

            • contentId : content id

              内容id

            • productId : product id

              产品id

            • price : price

              价格

            • quantity : quantity

              数量

            • amount : amount

              金额

            • remark : remark

              备注

          • ids 多个订单产品id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.orderProduct id=1>${object.quantity}</@trade.orderProduct>

          <@trade.orderProduct ids=1,2,3><#list map as k,v>${k}:${v.quantity}<#sep>,</#list></@trade.orderProduct>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/orderProduct?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.quantity);
            });
            </script>
           
          tradeOrderProductList 订单产品列表查询指令

          参数列表

          • orderId 订单id
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • orderId : order id

              订单id

            • contentId : content id

              内容id

            • productId : product id

              产品id

            • price : price

              价格

            • quantity : quantity

              数量

            • amount : amount

              金额

            • remark : remark

              备注

          使用示例

          <@trade.orderProductList orderId=1 pageSize=10><#list page.list as a>${a.productId}<#sep>,</#list></@trade.orderProductList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/trade/orderProductList?orderId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
           console.log(data.page.totalCount);
          });
          </script>
           
          tradePayment 支付订单查询指令

          参数列表

          • id 支付订单id,结果返回object
            • id : id
            • userId : user id

              用户id

            • amount : amount

              金额

            • description : description

              描述

            • tradeType : trade type(recharge,product)

              订单类型(recharge:充值,product:产品)

            • serialNumber : serial number

              订单流水

            • accountType : account type(account,alipay,wechat)

              账户类型(account:账户,alipay:支付宝,wechat:微信)

            • accountSerialNumber : account serial number

              账户流水

            • ip : ip
            • status : status(0:pending pay,1:paid,2:pending refund,3:refunded,4:closed)

              状态(0:待支付,1:已支付,2:待退款,3:已退款,4:已关闭)

            • processed : processed

              已处理

            • processUserId : process user id

              处理用户id

            • updateDate : update date

              更新日期

            • createDate : create date

              创建日期

            • processDate : process date

              处理日期

            • paymentDate : payment date

              支付日期

          • ids 多个支付订单id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.payment id=1>${object.amount}</@trade.payment>

          <@trade.payment ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.payment>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/payment?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.amount);
            });
            </script>
           
          tradePaymentHistory 支付订单历史查询指令

          参数列表

          • id 支付订单历史id,结果返回object
            • id : id
            • paymentId : payment id

              支付订单id

            • createDate : create date

              创建日期

            • operate : operate

              操作

            • content : content

              内容

          • ids 多个支付订单历史id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.paymentHistory id=1>${object.content}</@trade.paymentHistory>

          <@trade.paymentHistory ids=1,2,3><#list map as k,v>${k}:${v.content}<#sep>,</#list></@trade.paymentHistory>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/paymentHistory?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.content);
            });
            </script>
           
          tradePaymentHistoryList 账户列表查询指令

          参数列表

          • paymentId 付款id
          • startCreateDate 起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate 终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType 排序类型,【asc:正序,desc:倒叙】,默认为创建日期倒叙
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • paymentId : payment id

              支付订单id

            • createDate : create date

              创建日期

            • operate : operate

              操作

            • content : content

              内容

          使用示例

          <@trade.paymentHistory paymentId=1 pageSize=10><#list page.list as a>${a.content}<#sep>,</#list></@trade.paymentHistory>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/trade/paymentHistory?paymentId=1&pageSize=10&appToken=接口访问授权Token', function(data){    
           console.log(data.page.totalCount);
          });
          </script>
           
          tradePaymentList 支付列表查询指令

          参数列表

          • userId 用户id
          • tradeType 支付类型,【recharge:充值,product:产品】
          • serialNumber 流水号
          • accountType 账户类型,【account:账户,alipay:支付宝,wechat:微信】
          • accountSerialNumber 账号流水号
          • status 状态,【0:待支付,1:已支付,2:待退款,3:已退款,4:已关闭】
          • startCreateDate 起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate 终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType 排序类型,【asc:正序,desc:倒叙】,默认为发布日期倒叙
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • userId : user id

              用户id

            • amount : amount

              金额

            • description : description

              描述

            • tradeType : trade type(recharge,product)

              订单类型(recharge:充值,product:产品)

            • serialNumber : serial number

              订单流水

            • accountType : account type(account,alipay,wechat)

              账户类型(account:账户,alipay:支付宝,wechat:微信)

            • accountSerialNumber : account serial number

              账户流水

            • ip : ip
            • status : status(0:pending pay,1:paid,2:pending refund,3:refunded,4:closed)

              状态(0:待支付,1:已支付,2:待退款,3:已退款,4:已关闭)

            • processed : processed

              已处理

            • processUserId : process user id

              处理用户id

            • updateDate : update date

              更新日期

            • createDate : create date

              创建日期

            • processDate : process date

              处理日期

            • paymentDate : payment date

              支付日期

          使用示例

          <@trade.paymentList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.paymentList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/trade/paymentList?pageSize=10&authToken=用户登录Token&authUserId=用户id', function(data){    
           console.log(data.page.totalCount);
          });
          </script>
           
          tradeRefund 退款查询指令

          参数列表

          • id 退款id,结果返回object
            • id : id
            • userId : user id

              用户id

            • paymentId : payment id

              付款订单id

            • amount : apply amount

              申请退款金额

            • reason : reason

              原因

            • updateDate : update date

              更新日期

            • refundUserId : refund user id

              退款操作用户id

            • refundAmount : refund amount

              退款金额

            • status : status(0:pending,1:refunded,2:cancelled,3:refuse,4:fail)

              退款状态(0:待处理,1:已退款,2:取消,3:拒绝,4:失败)

            • reply : reply

              回复

            • createDate : create date

              创建日期

            • processingDate : process date

              处理日期

          • ids 多个退款id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@trade.refund id=1>${object.amount}</@trade.refund>

          <@trade.refund ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.refund>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/refund?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.amount);
            });
            </script>
           
          tradeRefundList 退款列表查询指令

          参数列表

          • userId 用户id
          • paymentId 支付id
          • refundUserId 退款操作用户id
          • status 状态,【0:待处理,1:已退款,2:取消,3:拒绝,4:失败】
          • startCreateDate 起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate 终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType 排序类型,【asc:正序,desc:倒叙】,默认为创建日期倒叙
          • pageIndex 页码
          • pageSize 每页条数

          返回结果

          • page
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list List类型 查询结果实体列表
            • id : id
            • userId : user id

              用户id

            • paymentId : payment id

              付款订单id

            • amount : apply amount

              申请退款金额

            • reason : reason

              原因

            • updateDate : update date

              更新日期

            • refundUserId : refund user id

              退款操作用户id

            • refundAmount : refund amount

              退款金额

            • status : status(0:pending,1:refunded,2:cancelled,3:refuse,4:fail)

              退款状态(0:待处理,1:已退款,2:取消,3:拒绝,4:失败)

            • reply : reply

              回复

            • createDate : create date

              创建日期

            • processingDate : process date

              处理日期

          使用示例

          <@trade.refundList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.refundList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/trade/refundList?pageSize=10&authToken=用户登录Token&authUserId=用户id', function(data){    
           console.log(data.page.totalCount);
          });
          </script>
           
          visitDay 访问日报表查询指令

          参数列表

          • visitDate:访问日期,【2020-01-01】
          • visitHour:访问小时,【-1-23】,-1表示整天数据,两个参数都不为空时,结果返回object
            • id : id
            • pv : page views

              页面访问数

            • uv : user views

              用户访问数

            • ipviews : ip views

              ip访问数

          使用示例

          <@visit.day visitDate='2020-01-01' visitHour=9>${object.pv}</@visit.day>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/day?visitDate=2020-01-01&visitHour=9&appToken=接口访问授权Token', function(data){
              console.log(data.pv);
            });
            </script>
           
          visitDayList 访问日报表列表查询指令

          参数列表

          • startVisitDate:起始访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endVisitDate:终止访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • hourAnalytics:小时统计,【true,false】,默认false
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • pv : page views

              页面访问数

            • uv : user views

              用户访问数

            • ipviews : ip views

              ip访问数

          使用示例

          <@visit.dayList hourAnalytics=false><#list page.list as a>${a.pv}<#sep>,</#list></@visit.dayList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/visit/dayList?hourAnalytics=false&appToken=接口访问授权Token', function(data){    
             console.log(data.page.totalCount);
           });
           </script>
           
          visitHistory 访问记录查询指令

          参数列表

          • id:记录id,结果返回object
            • sessionId : session id 会话id
            • visitDate : visit date 访问日期
            • visitHour : visit hour 访问小时
            • userId : visit user 访问用户
            • ip : ip
            • userAgent : user agent 浏览器用户标识
            • url : title 标题
            • screenWidth : screen width 屏幕宽度
            • screenHeight : screen height 屏幕高度
            • refererUrl : referer url 来源地址
            • itemType : item type 项目类型
            • itemId : item id 项目id
            • createDate : create date 创建日期
          • ids: 多个记录id,逗号或空格间隔,当id为空时生效,结果返回map(id,object)
          使用示例

          <@visit.history id=1>${object.title}</@visit.history>

          <@visit.history ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@visit.history>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/history?id=1&appToken=接口访问授权Token', function(data){    
              console.log(data.title);
            });
            </script>
           
          visitHistoryList 访问记录列表查询指令

          参数列表

          • sessionId:会话id
          • ip:ip
          • url:url
          • startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为创建日期倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • sessionId : session id 会话id
            • visitDate : visit date 访问日期
            • visitHour : visit hour 访问小时
            • userId : visit user 访问用户
            • ip : ip
            • userAgent : user agent 浏览器用户标识
            • url : title 标题
            • screenWidth : screen width 屏幕宽度
            • screenHeight : screen height 屏幕高度
            • refererUrl : referer url 来源地址
            • itemType : item type 项目类型
            • itemId : item id 项目id
            • createDate : create date 创建日期
          使用示例

          <@visit.historyList hourAnalytics=false><#list page.list as a>${a.url}<#sep>,</#list></@visit.historyList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/visit/historyList?hourAnalytics=false&appToken=接口访问授权Token', function(data){    
            console.log(data.page.totalCount);
          });
          </script>
           
          visitItem 访问项目报表查询指令

          参数列表

          • visitDate:访问日期,【2020-01-01】
          • itemType:访问项目类型,【category,content,user等页面统计时中的itemType】
          • itemId:访问项目id,三个参数都不为空时,结果返回object
            • id : id
            • pv : pv
            • uv : uv
            • ipviews : ip views

              ip访问数

          使用示例

          <@visit.item visitDate='2020-01-01' visitHour=9>${object.pv}</@visit.item>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/item?visitDate=2020-01-01&itemType=content&itemId=1&appToken=接口访问授权Token', function(data){    
              console.log(data.pv);
            });
            </script>
           
          visitItemList 访问项目列表查询指令

          参数列表

          • startVisitDate:起始访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endVisitDate:终止访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • itemType:项目类型,【category,content,user等页面统计时中的itemType】
          • itemId:项目id
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • pv : pv
            • uv : uv
            • ipviews : ip views

              ip访问数

          使用示例

          <@visit.itemList itemType='content'><#list page.list as a>${a.pv}<#sep>,</#list></@visit.itemList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/visit/itemList?itemType=content&appToken=接口访问授权Token', function(data){    
            console.log(data.page.totalCount);
          });
          </script>
           
          visitSession 访问会话报表查询指令

          参数列表

          • visitDate:访问日期,【2020-01-01】
          • sessionId:会话id,两个参数都不为空时,结果返回object
            • id : id
            • lastVisitDate : last visit date

              上次访问日期

            • firstVisitDate : first visit date

              首次访问日期

            • ip : ip
            • pv : pv
          使用示例

          <@visit.session visitDate='2020-01-01' sessionId='xxxx-xxxx-xxxx'>${object.pv}</@visit.session>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/session?visitDate=2020-01-01&sessionId=xxxx-xxxx-xxxx&appToken=接口访问授权Token', function(data){    
              console.log(data.pv);
            });
            </script>
           
          visitSessionList 访问会话报表列表查询指令

          参数列表

          • sessionId:会话id
          • ip:ip
          • startVisitDate:起始访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endVisitDate:终止访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • orderType:排序类型,【asc:正序,desc:倒序】,默认为创建日期倒序
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • lastVisitDate : last visit date

              上次访问日期

            • firstVisitDate : first visit date

              首次访问日期

            • ip : ip
            • pv : pv
          使用示例

          <@visit.sessionList><#list page.list as a>${a.pv}<#sep>,</#list></@visit.sessionList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/visit/sessionList?appToken=接口访问授权Token', function(data){    
            console.log(data.page.totalCount);
          });
          </script>
           
          visitUrl 访问网址报表查询指令

          参数列表

          • visitDate:访问日期,【2020-01-01】
          • urlMd5:访问网址md5
          • urlSha:访问网址sha,三个参数都不为空时,结果返回object
            • id : id
            • url : url 网址
            • pv : pv
            • uv : uv
            • ipviews : ip views ip访问数
          使用示例

          <@visit.url visitDate='2020-01-01' urlMd5='md5' urlSha='sha'>${object.pv}</@visit.url>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/url?visitDate=2020-01-01&urlMd5=MD5&urlSha=sha&appToken=接口访问授权Token', function(data){    
              console.log(data.pv);
            });
            </script>
           
          visitUrlList 访问网址报表列表查询指令

          参数列表

          • url:url
          • startVisitDate:起始访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • endVisitDate:终止访问日期,【2020-01-01 23:59:59】,【2020-01-01】
          • pageIndex:页码
          • pageSize:每页条数

          返回结果

          • page:
            • DEFAULT_PAGE_SIZE : 默认每页数据条数
            • MAX_PAGE_SIZE : 最大每页数据条数
            • totalCount : total count

              总数量

            • pageSize : page size

              每页数量

            • firstResult : first result offset

              当前开始位置

            • pageIndex : current page index

              当前页面

            • totalPage : total page

              总页数

            • list : result list

              结果列表

          • page.list:List类型 查询结果实体列表
            • id : id
            • url : url 网址
            • pv : pv
            • uv : uv
            • ipviews : ip views ip访问数
          使用示例

          <@visit.urlList><#list page.list as a>${a.pv}<#sep>,</#list></@visit.urlList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/visit/urlList?appToken=接口访问授权Token', function(data){    
            console.log(data.page.totalCount);
          });
          </script>
           
          confuse 混淆文字

          参数列表

          1. 字符串
          2. 数字,默认为字符数的1/5
          3. 布尔,是否html,默认否

          返回结果

          • ConfuseResult:map{text:加密文本,font:加密字体}
          使用示例 需要在 系统->站点配置->content->混淆原始字体文件 上传原始字体文件
           <#assign result=confuse('天津黑核科技有限公司',11)/>
           
           <style>
               @font-face {font-family:confuse;src:url(${result.font});}
               #content{font-family:confuse !important;}
           </style>
           <div id="content">${(result.text)!}</div>
           
           <script>
           $.getJSON('${site.dynamicPath}api/method/confuse?parameters=aaa&appToken=接口访问授权Token', function(data){
               console.log(data);
           });
           </script>
           
          confuse 混淆html中的文字

          参数列表

          1. 字符串
          2. 数字,默认为字符数的1/5

          返回结果

          • ConfuseResult:map{text:加密文本,font:加密字体}
          使用示例 需要在 系统->站点配置->content->混淆原始字体文件 上传原始字体文件
           <#assign result=confuseHtml('<a href="http://www.publiccms.com">publiccms</a>',11)/>
           
           <style>
               @font-face {font-family:confuse;src:url(${result.font});}
               #content{font-family:confuse !important;}
           </style>
           <div id="content">${(result.text?no_esc)!}</div>
           <script>
           var elements = document.querySelectorAll('#content > *');
             elements.forEach(function(element) {
                 if(element.style.fontFamily){
                     element.style.fontFamily='confuse,'+element.style.fontFamily;
                 }
             });
           </script>
           
           <script>
           $.getJSON('${site.dynamicPath}api/method/confuseHtml?parameters=aaa&appToken=接口访问授权Token', function(data){
               console.log(data);
           });
           </script>
           
          getAbsoluteUrl 获取url绝对路径

            getCategoryAttribute 获取分类扩展数据

            参数列表

            1. 分类id

            返回结果

            • attribute:分类扩展数据(字段编码,value)
            使用示例

            <#assign attribute=getCategoryAttribute(1)/<

            ${attribute.title!}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getCategoryAttribute?parameters=1', function(data){
            console.log(data.title);
            });
            </script>
             
            getCategoryAttributes 获取多个分类扩展数据

            参数列表

            1. 多个分类id

            返回结果

            • map(id,attribute:分类扩展数据(字段编码,value))
            使用示例

            <#assign attributeMap=getCategoryAttributes('1,2,3,4')/<

            ${attributeMap['1'].title!}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getCategoryAttributes?parameters=1,2,3,4', function(data){
            console.log(data);
            });
            </script>
             
            getContentAttribute 获取内容扩展数据

            参数列表

            1. 内容id

            返回结果

            • attribute:内容扩展数据(字段编码,value)
            使用示例

            <#assign attribute=getContentAttribute(1)/<

            ${(attribute.text?no_esc)!}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=接口访问授权Token&parameters=1', function(data){
            console.log(data.text);
            });
            </script>
             
            getContentAttributes 获取多个内容扩展数据

            参数列表

            1. 多个内容id

            返回结果

            • map(id,attribute:内容扩展数据(字段编码,value))
            使用示例

            <#assign attributeMap=getContentAttributes('1,2,3,4')/<

            ${attributeMap['1'].text?no_esc!}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getContentAttributes?appToken=接口访问授权Token&parameters=1,2,3,4', function(data){
            console.log(data);
            });
            </script>
             
            getContentPage 获取正文分页结果

            参数列表

            1. 正文
            2. 页码

            返回结果

            • page:
              • DEFAULT_PAGE_SIZE : 默认每页数据条数
              • MAX_PAGE_SIZE : 最大每页数据条数
              • totalCount : total count

                总数量

              • pageSize : page size

                每页数量

              • firstResult : first result offset

                当前开始位置

              • pageIndex : current page index

                当前页面

              • totalPage : total page

                总页数

              • list : result list

                结果列表

            • text:文章正文
            使用示例

            <#assign textPage=getContentPage(attribute.text,2)/<

            ${textPage.text?no_esc!} current page :${textPage.page.pageIndex}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getContentAttributes?parameters=正文内容&parameters=2', function(data){
            console.log(data.text);
            });
            </script>
             
            getDate 获取特定日期

            参数列表

            1. 日期类型【thisSunday:本周日,thisMonday:本周一,lastMonday:上周一,lastSunday:上周日,nextMonday:下周一,nextSunday:下周日】,默认当前时间
            2. 日期,【2020-01-01 23:59:59】,【2020-01-01】,为空则取当前日期

            返回结果

            • date:日期
            使用示例

            ${getDate('thisSunday','2020-01-01')}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getDate?parameters=thisSunday&parameters=2020-01-01', function(data){
            console.log(data);
            });
            </script>
             
            getDict 获取分词词典

            返回结果

            • string 自定义分词词典
            使用示例

            ${getDict()}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getDict?appToken=接口访问授权Token', function(data){
            console.log(data);
            });
            </script>
             
            getDictEnable 获取词典是否启用

            返回结果

            • boolean 词典是否启用
            使用示例

            ${getDictEnable()}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getDictEnable', function(data){
            console.log(data);
            });
            </script>
             
            getFileUploadPrefix 获取

            参数列表

            返回结果

            • url:文件上传前缀
            使用示例

            ${getFileUploadPrefix()}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getFileUploadPrefix', function(data){
            console.log(data);
            });
            </script>
             
            getFontList 获取系统字体列表

            返回结果

            • font list:字体名称列表
            使用示例

            <#list getFontList() as font>${font}</#list>

            <script>
            $.getJSON('${site.dynamicPath}api/method/getFontList?appToken=接口访问授权Token', function(data){
            console.log(data);
            });
            </script>
             
            getHash 获取哈希值

            参数列表

            1. 字符串

            返回结果

            • string:哈希值
            使用示例

            ${getHash('aaa')}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getHash?parameters=aaa', function(data){
            console.log(data);
            });
            </script>
             
            getHtml 获取远程页面文本

            参数列表

            1. url:
            2. 参数,map类型或string类型,为空时以get方式请求,不为空时以post方式请求
            3. 请求头,map类型

            返回结果

            • html:页面文本
            使用示例

            ${getHtml('https://www.publiccms.com/')}

            ${getHtml('https://www.publiccms.com/',"body")}

            ${getHtml('https://www.publiccms.com/',{"parameters1":"value1","parameters2":"value2"},{"headers1":"value1","headers2":"value2"})}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getHtml?appToken=接口访问授权Token&parameters=https://www.publiccms.com/', function(data){
            console.log(data);
            });
            </script>
             
            getIpRegion 获取IP区域信息

            返回结果

            • string ip
            使用示例

            ${getIpRegion('127.0.0.1')}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getIpRegion?parameters=127.0.0.1', function(data){
            console.log(data);
            });
            </script>
             
            getIpv4Number 获取ip的数字值

            参数列表

            1. ip

            返回结果

            • number:数字
            使用示例

            ${getIpv4Number('127.0.0.1')}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getIpv4Number?parameters=127.0.0.1', function(data){
            console.log(data);
            });
            </script>
             
            getIpv6Number 获取ip的数字值

            参数列表

            1. ip

            返回结果

            • number string:字符格式数字
            使用示例

            ${getIpv6Number('FF01:0:0:0:0:0:0:1101')}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getIpv4Number?parameters=FF01:0:0:0:0:0:0:1101', function(data){
            console.log(data);
            });
            </script>
             
            getKeywords 获取分词结果

            参数列表

            1. 完整语句

            返回结果

            • list(string):分词结果set
            使用示例

            <#list getKeywords('这是一段话') as a>${a}<#sep>,</#list><

            <script>
            $.getJSON('${site.dynamicPath}api/method/getKeywords?parameters=这是一段话', function(data){
            console.log(data);
            });
            </script>
             
            getLayoutStyle 布局样式表

            参数列表

            1. 包含/* selecter */的样式表
            2. 被替换的选择器

            返回结果

            • style:替换后的样式表
            使用示例

            ${getLayoutStyle('/* selecter */','.diy-layout')}

            <script>
            $.getJSON('${site.dynamicPath}api/method/getLayoutStyle?appToken=接口访问授权Token&parameters=/* selecter */&parameters=.diy-layout', function(data){
            console.log(data);
            });
            </script>
             
            getLicense 获取授权

            返回结果

            • license:授权数据
              使用示例

              ${getLicense().domain}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getLicense?appToken=接口访问授权Token, function(data){
              console.log(data);
              });
              </script>
               
              getLicenseData 获取授权数据

              返回结果

              • string:base64编码的授权数据
              使用示例

              ${getLicenseData()}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getLicenseData, function(data){
              console.log(data);
              });
              </script>
               
              getMd5 获取md5值

              参数列表

              1. 字符串

              返回结果

              • string:md5值
              使用示例

              ${getMd5('aaa')}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getMd5?parameters=aaa', function(data){
              console.log(data);
              });
              </script>
               
              getPage 获取分页url

              参数列表

              1. url
              2. pageIndex:页码数字
              3. string:分页参数,动态url分页参数名,为空时返回静态化url分页结果

              返回结果

              • url:带分页的url
              使用示例

              ${getPage('https://www.publiccms.com/introduction/index_3.html',2)}

              ${getPage('https://search.publiccms.com/?word=cms',2,'pageIndex')}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getHash?parameters=https://www.publiccms.com/introduction/index_3.html&parameters=2', function(data){
              console.log(data);
              });
              </script>
               
              getParameterTypeList 获取参数类型list

              返回结果

              • list:参数类型名称
              使用示例

              <#list getParameterTypeList() as a>${a}<#sep>,</#list>

              <script>
              $.getJSON('${site.dynamicPath}api/method/getParameterTypeList?appToken=接口访问授权Token', function(data){
              console.log(data);
              });
              </script>
               
              getPlaceAttribute 获取推荐位数据扩展数据

              参数列表

              1. 推荐位数据id

              返回结果

              • attribute:推荐位数据扩展数据(字段编码,value)
              使用示例

              <#assign attribute=getContentAttribute(1)/<

              ${(attribute.description)!}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=接口访问授权Token&parameters=1', function(data){
              console.log(data.description);
              });
              </script>
               
              getPlaceAttributes 获取多个推荐位数据扩展数据

              参数列表

              1. 多个荐位数据id

              返回结果

              • map(id,attribute:推荐位数据扩展数据(字段编码,value))
              使用示例

              <#assign attributeMap=getPlaceAttributes('1,2,3,4')/<

              ${attributeMap['1'].description!}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getPlaceAttributes?parameters=1,2,3,4', function(data){
              console.log(data);
              });
              </script>
               
              getPrivateUrl 获取私有文件绝对路径

              参数列表

              1. url,文件url
              2. expiryMinutes,过期分钟数,可以为空
              3. string,文件名,可以为空

              返回结果

              • url:绝对路径的url
              使用示例

              ${getPrivateUrl('index.html')}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getPrivateUrl?appToken=接口访问授权Token&parameters=index.html', function(data){
              console.log(data);
              });
              </script>
               
              getRandom 获取随机数字

              参数列表

              1. number:最大数字,可以为空

              返回结果

              • number:随机数字
              使用示例

              ${getRandom()}

              ${getRandom(100)}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getRandom?parameters=100', function(data){
              console.log(data);
              });
              </script>
               
              getSha1 获取sha1

              参数列表

              1. 字符串

              返回结果

              • string:sha1值
              使用示例

              ${getSha1('aaa')}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getSha1?parameters=aaa', function(data){
              console.log(data);
              });
              </script>
               
              GetSha2 获取sha2

                getSha256 获取sha256

                参数列表

                1. 字符串

                返回结果

                • string:sha256值
                使用示例

                ${getSha256('aaa')}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getSha256?parameters=aaa', function(data){
                console.log(data);
                });
                </script>
                 
                getSha512 获取sha512

                参数列表

                1. 字符串

                返回结果

                • string:sha512值
                使用示例

                ${getSha512('aaa')}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getSha512?parameters=aaa', function(data){
                console.log(data);
                });
                </script>
                 
                getSitefile 获取站点文件描述

                参数列表

                1. 文件名

                返回结果

                • sitefile:
                  使用示例

                  ${(getSitefile('aaa-site.zip').name)!}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getSitefile?appToken=接口访问授权Token&parameters=aaa-site.zip', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getSkipWord 获取词典忽略分词

                  返回结果

                  • string 词典忽略分词
                  使用示例

                  ${getSkipWord()}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getRandom?appToken=接口访问授权Token', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getSleep 睡眠一段时间

                  参数列表

                  1. number:睡眠时间0-60秒

                  返回结果

                  • boolean:是否睡眠
                  使用示例

                  ${getSleep(5)}

                  getTemplateResult 获取模板解析结果

                  参数列表

                  1. 模板内容

                  返回结果

                  • string:解析结果
                  使用示例

                  ${getTemplateResult('${.now}')}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getDate?appToken=接口访问授权Token&parameters=${.now}', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getTextFromHtml 获取html中的文本

                  参数列表

                  1. html内容

                  返回结果

                  • string:文本结果
                  使用示例

                  ${getTextFromHtml('<a href="http://www.publiccms.com/">publiccms</a>')}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getTextFromHtml?parameters=<a href="http://www.publiccms.com/">publiccms</a>', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getUUID 获取UUID

                  返回结果

                  • string:随机uuid
                  使用示例

                  ${getUUID()}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getUUID', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getUrl 获取url绝对路径

                  参数列表

                  1. url前缀
                  2. url,当第二个为空时,将第一个参数当作url

                  返回结果

                  • url:绝对路径的url
                  使用示例

                  ${getUrl(site.sitePath,'index.html')} ${getUrl('index.html')}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getUrl?parameters=index.html', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getXml 获取xml节点

                  参数列表

                  1. string:xml文本

                  返回结果

                  • xml:xml模型
                  使用示例

                  ${getXml('<xml><data>value</data></xml>').xml.data}