参数列表
uuid:设备唯一idclientVersion:客户端版本使用示例
<script>
$.getJSON('${site.dynamicPath}api/appClient?uuid=1&clientVersion=1.0&appToken=接口访问授权Token', function(data){
});
</script>
参数列表
appKey:应用keyappSecret:应用密钥返回结果
appToken:接口访问授权TokenexpiryDate:过期日期error:错误信息,当appKey、appSecret为空或错误时返回【secretError】<script>
$.getJSON('${site.dynamicPath}api/appToken?appKey=1&appSecret=1', function(data){
$('article p em').text(data.clicks);
});
</script>
参数列表
uuid:设备唯一idusername:用户名channel:登陆渠道返回结果
result:登录结果,【true,false】authToken:用户登录授权expiryDate:过期日期user:用户信息
id : idname : name 用户名weakPassword : weak password 弱密码nickname : nickname 昵称cover : cover 封面图deptId : dept id 部门idcontentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)roles : role ids 角色idemail : email 邮件地址emailChecked : email checked 已验证邮件superuser : super user 管理员disabled : disabled 已禁用plastLoginDate : last login date 上次登录日期lastLoginIp : last login ip 上次登录iploginCount : 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>
参数列表
uuid:设备唯一idchannel:客户端版本返回结果
result:绑定结果<script>
$.getJSON('${site.dynamicPath}api/bindingUser?uuid=1&channel=web&authToken=用户登录授权&authUserId=1', function(data){
console.log(data.result);
});
</script>
使用示例
<script>
$.getJSON('${site.dynamicPath}api/clearCache&appToken=接口访问授权Token', function(data){
console.log("ok");
});
</script>
参数列表
ids:多个内容iduncheck:取消审核, 【true,false】,默认为false返回结果
<script>
$.getJSON('${site.dynamicPath!}api/contentCheck?ids=1,2&authToken=用户登录授权&authUserId=1&appToken=接口访问授权Token', function(data){
});
</script>
参数列表
id:内容id返回结果
clicks:内容点击数<script>
$.getJSON('${site.dynamicPath}api/contentClick?id=1', function(data){
console.log(data.clicks);
});
</script>
参数列表
id:内容id,为空时新建内容categoryId:分类idmodelId:模型idtitle:标题description:描述author:作者editor:编辑copied:转载,【true,false】,默认为falsepublishDate:发布日期,默认为当前日期tagNames:多个标签名tagIds:多个标签idurl:url,当模型为外链时有效checked:已审核,【true,false】,默认为falseextendData:扩展数据mapsource:来源sourceUrl:来源URLtext:正文htmldraft:草稿,审核为false时有效,【true,false】,默认为falseparentId:父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>
参数列表
username:设备唯一idpassword:用户名encoding:密码加密方式channel:登录渠道返回结果
result:登录结果,【true,false】authToken:用户登录授权expiryDate:过期日期user:用户信息
id : idname : name 用户名weakPassword : weak password 弱密码nickname : nickname 昵称cover : cover 封面图deptId : dept id 部门idcontentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)roles : role ids 角色idemail : email 邮件地址emailChecked : email checked 已验证邮件superuser : super user 管理员disabled : disabled 已禁用plastLoginDate : last login date 上次登录日期lastLoginIp : last login ip 上次登录iploginCount : 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>
参数列表
categoryId:分类id,当parentId为空时有效containChild:是否包含子分类,【true,false】categoryIds:多个分类id,当categoryId为空时有效modelId:多个模型idparentId:父内容idonlyUrl:外链,【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 : idtitle : title 标题userId : user id 发布用户IDdeptId : dept id 发布用户部门IDcheckUserId : check user id 审核用户IDcategoryId : category id 分类IDmodelId : model id 模型IDparentId : parent id 父内容IDquoteContentId : quote content id 引用内容IDcopied : 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 多个标签idcover : 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 更新用户idupdateDate : 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>
参数列表
appToken:设备唯一id返回结果
authToken:用户登录授权expiryDate:过期日期error:错误信息【needNotRefresh】<script>
$.getJSON('${site.dynamicPath}api/login?appToken=接口访问授权Token', function(data){
console.log(appToken+","+expiryDate);
});
</script>
参数列表
uuid:设备唯一idchannel:客户端版本返回结果
result:取消绑定结果<script>
$.getJSON('${site.dynamicPath}api/unBindingUser?uuid=1&channel=web&authToken=用户登录授权&authUserId=1', function(data){
console.log(data.result);
});
</script>
认证头
appToken:应用授权TokenauthToken:用户登录TokenauthUserId:用户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>
参数列表
id:分类id,结果返回object
id : idname : name 名称parentId : parent id 父idtypeId : type id 分类类型idchildIds : child ids 子分类idtagTypeIds : tag type ids 标签类型idcode : 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为空时生效,结果返回objectabsoluteURL:url处理为绝对路径 默认为truecontainsAttribute默认为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>
参数列表
parentId:父分类idtypeId:分类类型idabsoluteURL:url处理为绝对路径, 默认为 truequeryAll:查询全部,【true,false】,parentId为空时有效advanced:开启高级选项, 默认为falsecontainsAttribute默认为true,http请求时为高级选项,为true时category.attribute为分类扩展数据map(字段编码,value)disabled:高级选项:禁用状态, 默认为falsehidden:高级选项:隐藏,【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 : idname : name 名称parentId : parent id 父idtypeId : type id 分类类型idchildIds : child ids 子分类idtagTypeIds : tag type ids 标签类型idcode : 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>
参数列表
categoryId:分类id,结果返回object
id : idcustomContentPath : custom content path 自定义内容访问路径templatePath : template path 模板路径contentPath : content path 内容路径modelId:内容模型id,当id为空时生效,结果返回objectmodelIds 多个内容模型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>
参数列表
modelId:内容模型idcategoryId:分类id返回结果
list:List类型 查询结果实体列表
id : idcustomContentPath : 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>
参数列表
id:分类id,结果返回object
id : idname : 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>
没有可用于查询得参数,该指令固定返回所有结果,不可分页查询
返回结果
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 : idname : 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>
参数列表
replaceSensitive:替换敏感词, 默认为trueid:评论id,结果返回object
id : iduserId : user id 发布用户idreplyId : reply comment id 回复评论idreplyUserId : reply user id 回复用户idreplies : replies 回复数scores : scores 分数contentId : content id 内容idip : ipcheckUserId : 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>
参数列表
userId:发布评论用户idreplyId:被回复评论idcontentId:内容idemptyReply:回复id是否为空, replyId为空时有效,默认为falsereplyUserId:被回复用户idreplaceSensitive:替换敏感词, 默认为trueadvanced:开启高级选项, 默认为falsestatus:高级选项:评论状态,【1:已发布,2:待审核】checkUserId:高级选项:审核用户iddisabled:高级选项:评论已删除,【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 : iduserId : user id 发布用户idreplyId : reply comment id 回复评论idreplyUserId : reply user id 回复用户idreplies : replies 回复数scores : scores 分数contentId : content id 内容idip : ipcheckUserId : 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>
参数列表
id 内容id,结果返回object
id : idtitle : title 标题userId : user id 发布用户IDdeptId : dept id 发布用户部门IDcheckUserId : check user id 审核用户IDcategoryId : category id 分类IDmodelId : model id 模型IDparentId : parent id 父内容IDquoteContentId : quote content id 引用内容IDcopied : 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 多个标签idcover : 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 更新用户idupdateDate : update date 更新日期createDate : create date 创建日期sort : top 置顶级别status : status(0:Draft,1:Published,2:Pending,3:Rejected) 状态(0:草稿,1:已发布,2:待审核,3:驳回)absoluteURL:url处理为绝对路径 默认为 trueabsoluteId:id处理为引用内容的ID 默认为 truecontainsAttribute 默认为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>
参数列表
fileTypes:文件类型,【image:图片,video:视频,audio:音频,other:其他】image:是否图片,当fileTypes为空时有效,【true,false】contentId:内容iduserId:用户idabsoluteURL:url处理为绝对路径 默认为trueorderField:排序字段,【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 : idcontentId : 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>
参数列表
categoryId:分类id,当parentId为空时有效containChild:是否包含子分类,【true,false】categoryIds:多个分类id,当categoryId为空时有效modelId:多个模型idparentId:父内容idonlyUrl:外链,【true,false】hasImages:拥有图片列表,【true,false】hasFiles:拥有附件列表,【true,false】hasProducts:拥有产品列表,【true,false】hasCover:拥有封面图,【true,false】userId:发布用户idstartPublishDate:起始发布日期,【2020-01-01 23:59:59】,【2020-01-01】endPublishDate:终止发布日期,高级选项禁用时不能超过现在,【2020-01-01 23:59:59】,【2020-01-01】advanced:开启高级选项, 默认为falsestatus:高级选项:内容状态,【0:操作,1:已发布,2:待审核,3:驳回】disabled:高级选项:禁用状态,默认为falseemptyParent:高级选项:父内容id是否为空,【true,false】,当parentId为空时有效title:高级选项:标题absoluteURL:url处理为绝对路径 默认为trueabsoluteId:id处理为引用内容的ID 默认为truecontainsAttribute默认为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 : idtitle : title 标题userId : user id 发布用户IDdeptId : dept id 发布用户部门IDcheckUserId : check user id 审核用户IDcategoryId : category id 分类IDmodelId : model id 模型IDparentId : parent id 父内容IDquoteContentId : quote content id 引用内容IDcopied : 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 多个标签idcover : 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 更新用户idupdateDate : 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>
参数列表
id:内容id,结果返回object
id : idcontentId : content
内容
userId : upload user id
上传用户id
cover : cover
封面图
title : title
标题
price : price
价格
minQuantity : min quantity
最小购买数量
maxQuantity : max quantity
最大购买数量
inventory : inventory
库存
sales : sales
销量
absoluteURL:cover处理为绝对路径 默认为 trueids:多个内容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>
参数列表
contentId:内容iduserId:发布产品用户idtitle:标题startPrice:开始价格endPrice:结束价格absoluteURL:封面图处理为绝对路径 默认为trueorderField 排序字段,【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 : idcontentId : 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>
参数列表
quoteId:引用内容id返回结果:
list:List类型 查询结果实体列表
id : idtitle : title 标题userId : user id 发布用户IDdeptId : dept id 发布用户部门IDcheckUserId : check user id 审核用户IDcategoryId : category id 分类IDmodelId : model id 模型IDparentId : parent id 父内容IDquoteContentId : quote content id 引用内容IDcopied : 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 多个标签idcover : 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 更新用户idupdateDate : 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>
参数列表
contentId:内容idrelatedContentId:被推荐内容idrelationType:关系类型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 : idcontentId : content id 内容idrelationType : relation type 关系类型relation : relation 关系relatedContentId : related content id 推进内容iduserId : related user id 推进用户idurl : 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>
参数列表
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>
参数列表
dictionaryId:数据字典idvalue 值,结果返回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>
参数列表
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>
参数列表
dictionaryId:数据字典idexcludeDictionaryId 排除的字典,结果返回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>
参数列表
dictionaryId:字典idexcludeDictionaryId:排除数据字典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>
参数列表
dictionaryId:数据字典idexcludeDictionaryId:排除的字典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>
参数列表
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>
参数列表
id:id,结果返回object
id : iditemType : item type 项目类型itemId : item id 项目idfieldName : 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>
参数列表
itemType:项目类型itemId:项目idfieldName:字段名userId:用户idorderType:排序类型,【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 : iditemType : item type 项目类型itemId : item id 项目idfieldName : 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>
参数列表
返回结果
page 分面搜索结果
facetMap : facet result map(field,(value,count))
分面搜索结果(字段名,(值,结果总数))
page.list:List类型 查询结果实体列表
id : idtitle : title 标题userId : user id 发布用户IDdeptId : dept id 发布用户部门IDcheckUserId : check user id 审核用户IDcategoryId : category id 分类IDmodelId : model id 模型IDparentId : parent id 父内容IDquoteContentId : quote content id 引用内容IDcopied : 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 多个标签idcover : 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 更新用户idupdateDate : 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>
参数列表
id:内容模型id,结果返回object
id : idparentId : 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>
参数列表
parentId:父内容模型idqueryAll:查询所有模型,parentId为空时有效,【true,false】,默认falsehasChild:拥有子模型,【true,false】onlyUrl:外链,【true,false】hasImages:拥有图片列表,【true,false】hasFiles:拥有文件列表,【true,false】返回结果
list:List类型 查询结果实体列表
id : idparentId : 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>
参数列表
id:推荐位id,结果返回object
id : idpath : place path 推荐位路径userId : user id 创建用户idcheckUserId : check user id 审核用户iditemType : item type 数据项类型itemId : item id 数据项idtitle : 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处理为绝对路径 默认为 truecontainsAttribute:默认为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>
参数列表
path:页面片段路径userId:发布用户idadvanced:开启高级选项, 默认为falsestatus:高级选项:数据状态,【0:操作,1:已发布,2:待审核】disabled:高级选项:禁用状态,默认为falsestartPublishDate:起始发布日期,【2020-01-01 23:59:59】,【2020-01-01】endPublishDate:终止发布日期,高级选项禁用时不能超过现在,【2020-01-01 23:59:59】,【2020-01-01】itemType:数据项类型,【content:内容,category:分类,custom:自定义】itemId:数据项idabsoluteURL:url、封面图处理为绝对路径 默认为truecontainsAttribute:默认为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 : idpath : place path 推荐位路径userId : user id 创建用户idcheckUserId : check user id 审核用户iditemType : item type 数据项类型itemId : item id 数据项idtitle : 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>
参数列表
word:搜索词,多个搜索词时取并集结果exclude:排除词汇tagIds:多个标签id,多个标签时取并集结果userId:用户idparentId:父内容idcategoryId:分类idcontainChild:包含子分类,当categoryId不为空时有效categoryIds:多个分类id,当categoryId为空时有效modelIds:多个模型idextendsValues 多个全文搜索字段值,格式:[字段编码]:字段值],例如: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】,默认为falsephrase:精确搜索,【true,false】,默认为falsefields:搜索字段,【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 : idtitle : title 标题userId : user id 发布用户IDdeptId : dept id 发布用户部门IDcheckUserId : check user id 审核用户IDcategoryId : category id 分类IDmodelId : model id 模型IDparentId : parent id 父内容IDquoteContentId : quote content id 引用内容IDcopied : 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 多个标签idcover : 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 更新用户idupdateDate : 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>
参数列表
id:调查问卷id,结果返回object
id : iduserId : user id 发布用户idsurveyType : 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>
参数列表
userId:发布用户idsurveyType:问卷类型,【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:已禁用,默认为falseorderField 排序字段,【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 : iduserId : user id 发布用户idsurveyType : 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>
参数列表
id:调查问卷问题id,结果返回object
id : idsurveyId : 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:封面图处理为绝对路径 默认为trueadvanced:开启高级选项, 默认为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>
参数列表
id:调查问卷问题id,结果返回object
id : idquestionId : 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>
参数列表
questionId:问题idorderField:排序字段,【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 : idquestionId : 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>
参数列表
surveyId:问卷调查idquestionTypes 多个问题类型,【radio:单选,select:下拉选择,checkbox:复选框,text:文字,file:文件,picture:图片】absoluteURL:封面图处理为绝对路径 默认为trueadvanced:开启高级选项, 默认为falseorderType:排序类型,【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 : idsurveyId : 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>
参数列表
id:标签id,结果返回object
id : idname : 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>
参数列表
typeId:标签类型idname:标签名advanced:开启高级选项, 默认为falseorderField:高级选项:排序字段,【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 : idname : 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>
参数列表
id:标签类型id,结果返回object
id : idname : 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>
参数列表
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 : idname : 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>
参数列表
userId:用户idcontentId:内容id,结果返回object
id : idcreateDate : 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>
参数列表
userId:用户idcontentId:内容idpageIndex:页码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 : idcreateDate : 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>
参数列表
userId:用户iditemType:项目类型itemId:项目id,结果返回object
id : idscore : score 分数ip : ipcreateDate : 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>
参数列表
userId:用户iditemType:项目类型itemId:项目idpageIndex:页码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 : idscore : score 分数ip : ipcreateDate : 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>
参数列表
userId:用户idsurveyId:问卷id,结果返回object
id : idanonymous : anonymous 匿名用户score : score 分数ip : ipcreateDate : 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>
参数列表
userId:用户idsurveyId:问卷idorderField:排序字段,【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 : idanonymous : anonymous 匿名用户score : score 分数ip : ipcreateDate : 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>
参数列表
userId:用户idquestionId:问题id,结果返回object
id : idsurveyId : 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>
参数列表
userId:用户idquestionId:问题idsurveyId:问卷idorderField:排序字段,【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 : idsurveyId : 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>
参数列表
userId:用户idvoteId:投票id,结果返回object
id : idanonymous : anonymous 匿名用户itemId : item id 选项idip : ipcreateDate : 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>
参数列表
userId:用户idvoteId:投票idorderType:排序类型,【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 : idanonymous : anonymous 匿名用户itemId : item id 选项idip : ipcreateDate : 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>
参数列表
id:投票id,结果返回object
id : idstartDate : 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>
参数列表
id:投票选项id,结果返回object
id : idvoteId : 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>
参数列表
voteId:投票idorderField:排序字段,【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 : idvoteId : 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>
参数列表
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:开启高级选项, 默认为falsedisabled:高级选项:禁用状态,默认为falsetitle:高级选项:标题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 : idstartDate : 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>
参数列表
id:搜索词id,结果返回object
id : idname : name 名称searchCount : search count 搜索次数hidden : hidden 隐藏ip : ipcreateDate : 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>
参数列表
startCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】advanced:开启高级选项, 默认为falsehidden:高级选项:禁用状态,默认为falsename:高级选项:名称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 : idname : name 名称searchCount : search count 搜索次数hidden : hidden 隐藏ip : ipcreateDate : 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>
参数列表
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>
参数列表
userId:用户idstartCreateDate:起始创建日期,【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:IPorderType:排序类型,【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 : idname : name
用户名
userId : user id
用户id
ip : ipchannel : 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>
参数列表
id:日志id,结果返回object
id : iduserId : user id
用户id
deptId : dept id
部门id
channel : channel
渠道
operate : operate channel
操作渠道
ip : ipcreateDate : 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>
参数列表
channel:渠道operate:操作编码userId:用户IDstartCreateDate:起始创建日期,【2020-01-01 23:59:59】,【2020-01-01】endCreateDate:终止创建日期,【2020-01-01 23:59:59】,【2020-01-01】content:操作内容name:用户名ip:IPorderType:排序类型,【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 : iduserId : user id
用户id
deptId : dept id
部门id
channel : channel
渠道
operate : operate channel
操作渠道
ip : ipcreateDate : 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>
参数列表
id:日志id,结果返回object
id : idtaskId : 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>
参数列表
taskId:任务计划IDstartCreateDate:起始创建日期,【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 : idtaskId : 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>
参数列表
fileTypes:文件类型,【image,video,audio,document,other】image:是否图片,【true,false】userId:用户IDchannel:渠道privatefile:私有文件,【true,false】,默认falseoriginalName:原文件名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 : iduserId : user id 用户idchannel : operate channel 操作渠道originalName : original name 原文件名privatefile : privatefile 私有文件fileType : file type 文件类型fileSize : file size 文件大小width : image width 图片宽度height : image height 图片高度ip : ipcreateDate : 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>
参数列表 返回结果
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>
参数列表
id:应用id,结果返回object
id : idchannel : 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>
参数列表
id:客户端id,结果返回object
id : idchannel : 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>
参数列表
advanced:开启高级选项, 默认为falsedisabled:高级选项:禁用状态,【true,false】,默认falsechannel:渠道userId:用户idstartLastLoginDate:起始上次登录日期,【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 : idchannel : 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>
参数列表
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 : idchannel : 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>
参数列表
appId:应用idpageIndex:页码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>
参数列表
roleIds:多个角色idurl url,roleIds、url都存在时,结果返回true或false,表示这些角色是否拥有该url的权限urls 多个url,当roleIds存在,且url为空时生效,结果返回map(url,true或false)<@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>
参数列表
startHeartbeatDate:起始心跳日期,【2020-01-01 23:59:59】,【2020-01-01】endHeartbeatDate:终止心跳日期,【2020-01-01 23:59:59】,【2020-01-01】master:是否主节点,【true,false】,默认falseorderField:排序字段,[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 : uuidcreateDate : 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>
参数列表
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>
参数列表
code:配置编码,结果返回object
id : iddata : 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>
参数列表
code:配置编码返回结果
list:List类型 查询结果实体列表
id : idrequired : 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>
返回结果
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>
参数列表
id:部门id,结果返回object
id : idname : 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>
参数列表
deptId:部门idItemId 分类id,deptId、ItemId都存在时,结果返回true或false,表示该部门是否拥有该分类下内容的数据权限ItemIds 多个分类id,当deptId存在,且ItemId为空时生效,结果返回map(分类id,true或false)<@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>
参数列表
deptId:部门iditemType:项目类型itemId:项目idpageIndex:页码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>
参数列表
parentId:父部门iduserId:负责人idname:名称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 : idname : 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>
参数列表
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>
参数列表
advanced:开启高级选项, 默认为falsesiteId:高级选项:站点idwild:高级选项:通配域名,【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>
参数列表
extendId:扩展idinputType:多个输入框类型【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 : idrequired : 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>
参数列表
itemType:项目类型itemId:项目id,结果返回object
id : iduserId : 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>
参数列表
id:模块id,结果返回object
id : idurl : 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>
参数列表
moduleId:模块id,结果返回object
id : idurl : 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>
参数列表
advanced:开启高级选项, 默认为falsemenu:高级选项:是否菜单,【true,false】parentId:父模块idpageIndex:页码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 : idurl : 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>
参数列表
code:记录编码,结果返回objectdata:记录数据,不为空时记录该数据
id : iddata : 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>
参数列表
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 : iddata : 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>
参数列表
id:角色id,结果返回object
id : idname : 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>
参数列表
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 : idname : 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>
参数列表
roleIds:多个角色idmoduleId 模块id,roleIds、moduleId都存在时,结果返回true或false,表示这些角色是否拥有该模块的数据权限moduleIds 多个模块id,当roleIds存在,且moduleId为空时生效,结果返回map(模块id,true或false)<@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>
参数列表
roleId:角色idmoduleId:模块idpageIndex:页码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>
参数列表
roleId:角色iduserId:用户idpageIndex:页码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>
参数列表
id:站点id,结果返回object
id : idparentId : 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>
参数列表
advanced:开启高级选项, 默认为falsedisabled:高级选项:已禁用,【true,false】parentId:父站点idname:名称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 : idparentId : 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>
参数列表
id:任务计划id,结果返回object
id : idname : 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>
参数列表
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 : idname : 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>
参数列表
replaceSensitive:替换敏感词, 默认为trueid:用户id,结果返回object
id : idname : name 用户名weakPassword : weak password 弱密码nickname : nickname 昵称cover : cover 封面图deptId : dept id 部门idcontentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)roles : role ids 角色idemail : email 邮件地址emailChecked : email checked 已验证邮件superuser : super user 管理员disabled : disabled 已禁用plastLoginDate : last login date 上次登录日期lastLoginIp : last login ip 上次登录iploginCount : 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>
参数列表
advanced:开启高级选项, 默认为falsereplaceSensitive:替换敏感词, 默认为truedisabled:高级选项:已禁用,【true,false】, 默认为falsedeptId:部门idstartRegisteredDate:起始注册日期,【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 : idname : name 用户名weakPassword : weak password 弱密码nickname : nickname 昵称cover : cover 封面图deptId : dept id 部门idcontentPermissions : content permissions(0:self,1:all,2:dept) 内容权限(0:自己的,1:全部,2:本部门)roles : role ids 角色idemail : email 邮件地址emailChecked : email checked 已验证邮件superuser : super user 管理员disabled : disabled 已禁用plastLoginDate : last login date 上次登录日期lastLoginIp : last login ip 上次登录iploginCount : 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>
参数列表
userId:用户idchannel:渠道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>
参数列表
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>
参数列表
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>
参数列表
id:分类idids:多个分类idpageIndex:当前页码,默认值1totalPage:最大页码,为空时则只生成当前页返回结果
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>
参数列表
id:内容idids:多个内容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>
参数列表
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>
参数列表
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>
参数列表
id:分类idtemplatePath:模板路径filePath:静态文件路径pageIndex:当前页码,默认为1totalPage:最大页码,为空时则只生成当前页返回结果
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>
参数列表
id:内容idtemplatePath:模板路径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>
参数列表
itemType:锁定项目类型itemId:锁定项目iduserId:锁定用户idcounter:计数,默认值0:返回结果
object:
id : iduserId : 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>
参数列表
templatePath:模板路径filePath:静态文件路径pageIndex:当前页码,默认为1parameters:参数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¶meters.parameter1=value1&appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
参数列表
admin:是否后台,默认值false:返回结果
<input type="hidden" name="_csrf" value="<@tools.csrfToken/>"/>
返回结果
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>
参数列表
itemType:元数据类型,【region,layout,module】itemId:元数据id返回结果
object:diy元数据region:
id : idcategoryType : category type
分类类型
name : name
名称
layout:
id : idregion : region
区域
name : name
名称
template : template
模板
style : style
样式
module:
id : idregion : 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>
参数列表
itemType:元数据类型,【region,layout,module】region:区域id,当itemType为layout或module时有效showGlobal:元数据类型,【true,false】,当itemType为layout或module时有效,默认为true:返回结果
list: diy元数据列表region:
id : idcategoryType : category type
分类类型
name : name
名称
layout:
id : idregion : region
区域
name : name
名称
template : template
模板
style : style
样式
module:
id : idregion : 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>
参数列表
id:区域idcategoryId:分类id返回结果
object:
id : idlayoutList : 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>
返回结果
object:异常字符串<@tools.exception>${object}</@tools.exception>
参数列表
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>
参数列表
type:文件类型【file,task,template】,默认templatepath:文件路径返回结果
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>
参数列表
type:文件类型【file,task,template】,默认templatepath:文件路径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>
参数列表
type:文件类型【file,task,template】,默认templatepath:文件路径返回结果
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>
参数列表
type:文件类型【file,task,template】,默认templatepath:文件路径返回结果
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>
参数列表
type:文件类型【file,task,template】,默认templatepath:文件路径返回结果
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>
参数列表
type:文件类型【file,task,template】,默认templatepath:文件路径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>
参数列表
type:文件类型【file,task,template】,默认templatepath:文件路径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>
参数列表
id:布局id打印包含结果
使用示例
<@tools.includeLayout id='00000000-0000-0000-0000-000000000000'>${index},</@tools.includeLayout>
参数列表
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>
参数列表
id:布局id打印包含结果
使用示例
<@tools.includeRegion id='00000000-0000-0000-0000-000000000000' categoryId=1/>
参数列表
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>
使用示例
<@tools.masterSite>this is a master site</@tools.masterSite>
返回结果
freeMemory:空闲内存totalMemory:总内存maxMemory:最大内存<@tools.memory>${totalMemory}</@tools.memory>
<script>
$.getJSON('${site.dynamicPath}api/directive/tools/memory?appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
参数列表
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>
参数列表
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>
参数列表
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¶meters.parameter1=value1&appToken=接口访问授权Token', function(data){
console.log(data.alias);
});
</script>
返回结果
java.version:Java version numberjava.vendor:Java vendor specific stringjava.vendor.url:Java vendor URLjava.home:Java installation directoryjava.class.version:Java class version numberjava.class.path:Java classpathos.name:Operating System Nameos.arch:Operating System Architectureos.version:Operating System Versionfile.separator:File separator (SEPARATOR on Unix)path.separator:Path separator (":" on Unix)line.separator:Line separator ("\n" on Unix)user.name:User account nameuser.home:User home directoryuser.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>
参数列表
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>
参数列表
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>
参数列表
parameters:参数maptemplateContent:模板内容使用示例
<@tools.templateResult templateContent='${name}' parameters={'name':'value'}/>
<script>
$.getJSON('${site.dynamicPath}api/directive/tools/templateResult?path=$%7Bname%7D¶meters.name=value&appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
参数列表
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>
参数列表
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,为空时取当前请求的user agent返回结果
object.ip:客户端ipobject.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>
返回结果
cms:cms版本revision:修订版authorizationEdition:使用授权authorizationStartDate:授权起始日期authorizationEndDate:授权结束日期authorizationOrganization:授权单位cluster:节点idmaster:是否管理节点【true:管理节点,false:普通节点】<@tools.version path='/'>${a.fileName}</@tools.version>
<script>
$.getJSON('${site.dynamicPath}api/directive/tools/version', function(data){
console.log(data.cms);
});
</script>
参数列表
id 账户id,结果返回object
id : idamount : 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>
参数列表
id 账户历史id,结果返回object
id : idserialNumber : 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>
参数列表
accountId 账户iduserId 操作用户idstatus 状态,【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 : idserialNumber : 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>
参数列表
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 : idamount : 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>
参数列表
id 订单id,结果返回object
id : iduserId : user id
用户id
title : title
标题
amount : amount
金额
paymentId : payment id
支付订单id
address : address
收货地址
addressee : addressee
收件人
telephone : telphone
电话
ip : ipremark : 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>
参数列表
id 订单历史id,结果返回object
id : idorderId : 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>
参数列表
orderId 订单idstartCreateDate 起始创建日期,【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 : idorderId : 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>
参数列表
userId 用户idpaymentId 付款idstatus 状态,【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 : iduserId : user id
用户id
title : title
标题
amount : amount
金额
paymentId : payment id
支付订单id
address : address
收货地址
addressee : addressee
收件人
telephone : telphone
电话
ip : ipremark : 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>
参数列表
id 订单产品id,结果返回object
id : idorderId : 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>
参数列表
orderId 订单idpageIndex 页码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 : idorderId : 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>
参数列表
id 支付订单id,结果返回object
id : iduserId : 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 : ipstatus : 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>
参数列表
id 支付订单历史id,结果返回object
id : idpaymentId : 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>
参数列表
paymentId 付款idstartCreateDate 起始创建日期,【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 : idpaymentId : 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>
参数列表
userId 用户idtradeType 支付类型,【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 : iduserId : 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 : ipstatus : 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>
参数列表
id 退款id,结果返回object
id : iduserId : 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>
参数列表
userId 用户idpaymentId 支付idrefundUserId 退款操作用户idstatus 状态,【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 : iduserId : 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>
参数列表
visitDate:访问日期,【2020-01-01】visitHour:访问小时,【-1-23】,-1表示整天数据,两个参数都不为空时,结果返回object
id : idpv : 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>
参数列表
startVisitDate:起始访问日期,【2020-01-01 23:59:59】,【2020-01-01】endVisitDate:终止访问日期,【2020-01-01 23:59:59】,【2020-01-01】hourAnalytics:小时统计,【true,false】,默认falsepageIndex:页码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 : idpv : 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>
参数列表
id:记录id,结果返回object
sessionId : session id 会话idvisitDate : visit date 访问日期visitHour : visit hour 访问小时userId : visit user 访问用户ip : ipuserAgent : user agent 浏览器用户标识url : title 标题screenWidth : screen width 屏幕宽度screenHeight : screen height 屏幕高度refererUrl : referer url 来源地址itemType : item type 项目类型itemId : item id 项目idcreateDate : 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>
参数列表
sessionId:会话idip:ipurl:urlstartCreateDate:起始创建日期,【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 会话idvisitDate : visit date 访问日期visitHour : visit hour 访问小时userId : visit user 访问用户ip : ipuserAgent : user agent 浏览器用户标识url : title 标题screenWidth : screen width 屏幕宽度screenHeight : screen height 屏幕高度refererUrl : referer url 来源地址itemType : item type 项目类型itemId : item id 项目idcreateDate : 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>
参数列表
visitDate:访问日期,【2020-01-01】itemType:访问项目类型,【category,content,user等页面统计时中的itemType】itemId:访问项目id,三个参数都不为空时,结果返回object
id : idpv : pvuv : uvipviews : 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>
参数列表
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:项目idpageIndex:页码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 : idpv : pvuv : uvipviews : 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>
参数列表
visitDate:访问日期,【2020-01-01】sessionId:会话id,两个参数都不为空时,结果返回object
id : idlastVisitDate : last visit date
上次访问日期
firstVisitDate : first visit date
首次访问日期
ip : ippv : 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>
参数列表
sessionId:会话idip:ipstartVisitDate:起始访问日期,【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 : idlastVisitDate : last visit date
上次访问日期
firstVisitDate : first visit date
首次访问日期
ip : ippv : 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>
参数列表
visitDate:访问日期,【2020-01-01】urlMd5:访问网址md5urlSha:访问网址sha,三个参数都不为空时,结果返回object
id : idurl : url 网址pv : pvuv : uvipviews : 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>
参数列表
url:urlstartVisitDate:起始访问日期,【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 : idurl : url 网址pv : pvuv : uvipviews : 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>
参数列表
返回结果
ConfuseResult:map{text:加密文本,font:加密字体} <#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>
参数列表
返回结果
ConfuseResult:map{text:加密文本,font:加密字体} <#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>
参数列表
返回结果
attribute:分类扩展数据(字段编码,value)<#assign attribute=getCategoryAttribute(1)/<
${attribute.title!}
<script>
$.getJSON('${site.dynamicPath}api/method/getCategoryAttribute?parameters=1', function(data){
console.log(data.title);
});
</script>
参数列表
返回结果
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>
参数列表
返回结果
attribute:内容扩展数据(字段编码,value)<#assign attribute=getContentAttribute(1)/<
${(attribute.text?no_esc)!}
<script>
$.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=接口访问授权Token¶meters=1', function(data){
console.log(data.text);
});
</script>
参数列表
返回结果
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¶meters=1,2,3,4', function(data){
console.log(data);
});
</script>
参数列表
返回结果
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=正文内容¶meters=2', function(data){
console.log(data.text);
});
</script>
参数列表
返回结果
date:日期${getDate('thisSunday','2020-01-01')}
<script>
$.getJSON('${site.dynamicPath}api/method/getDate?parameters=thisSunday¶meters=2020-01-01', function(data){
console.log(data);
});
</script>
返回结果
string 自定义分词词典${getDict()}
<script>
$.getJSON('${site.dynamicPath}api/method/getDict?appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
返回结果
boolean 词典是否启用${getDictEnable()}
<script>
$.getJSON('${site.dynamicPath}api/method/getDictEnable', function(data){
console.log(data);
});
</script>
参数列表
返回结果
url:文件上传前缀${getFileUploadPrefix()}
<script>
$.getJSON('${site.dynamicPath}api/method/getFileUploadPrefix', function(data){
console.log(data);
});
</script>
返回结果
font list:字体名称列表<#list getFontList() as font>${font}</#list>
<script>
$.getJSON('${site.dynamicPath}api/method/getFontList?appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
参数列表
返回结果
string:哈希值${getHash('aaa')}
<script>
$.getJSON('${site.dynamicPath}api/method/getHash?parameters=aaa', function(data){
console.log(data);
});
</script>
参数列表
url:map类型或string类型,为空时以get方式请求,不为空时以post方式请求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¶meters=https://www.publiccms.com/', function(data){
console.log(data);
});
</script>
返回结果
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>
参数列表
返回结果
number:数字${getIpv4Number('127.0.0.1')}
<script>
$.getJSON('${site.dynamicPath}api/method/getIpv4Number?parameters=127.0.0.1', function(data){
console.log(data);
});
</script>
参数列表
返回结果
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>
参数列表
返回结果
list(string):分词结果set<#list getKeywords('这是一段话') as a>${a}<#sep>,</#list><
<script>
$.getJSON('${site.dynamicPath}api/method/getKeywords?parameters=这是一段话', function(data){
console.log(data);
});
</script>
参数列表
返回结果
style:替换后的样式表${getLayoutStyle('/* selecter */','.diy-layout')}
<script>
$.getJSON('${site.dynamicPath}api/method/getLayoutStyle?appToken=接口访问授权Token¶meters=/* selecter */¶meters=.diy-layout', function(data){
console.log(data);
});
</script>
返回结果
license:授权数据
${getLicense().domain}
<script>
$.getJSON('${site.dynamicPath}api/method/getLicense?appToken=接口访问授权Token, function(data){
console.log(data);
});
</script>
返回结果
string:base64编码的授权数据${getLicenseData()}
<script>
$.getJSON('${site.dynamicPath}api/method/getLicenseData, function(data){
console.log(data);
});
</script>
参数列表
返回结果
string:md5值${getMd5('aaa')}
<script>
$.getJSON('${site.dynamicPath}api/method/getMd5?parameters=aaa', function(data){
console.log(data);
});
</script>
参数列表
urlpageIndex:页码数字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¶meters=2', function(data){
console.log(data);
});
</script>
返回结果
list:参数类型名称<#list getParameterTypeList() as a>${a}<#sep>,</#list>
<script>
$.getJSON('${site.dynamicPath}api/method/getParameterTypeList?appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
参数列表
返回结果
attribute:推荐位数据扩展数据(字段编码,value)<#assign attribute=getContentAttribute(1)/<
${(attribute.description)!}
<script>
$.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=接口访问授权Token¶meters=1', function(data){
console.log(data.description);
});
</script>
参数列表
返回结果
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>
参数列表
url,文件urlexpiryMinutes,过期分钟数,可以为空string,文件名,可以为空返回结果
url:绝对路径的url${getPrivateUrl('index.html')}
<script>
$.getJSON('${site.dynamicPath}api/method/getPrivateUrl?appToken=接口访问授权Token¶meters=index.html', function(data){
console.log(data);
});
</script>
参数列表
number:最大数字,可以为空返回结果
number:随机数字${getRandom()}
${getRandom(100)}
<script>
$.getJSON('${site.dynamicPath}api/method/getRandom?parameters=100', function(data){
console.log(data);
});
</script>
参数列表
返回结果
string:sha1值${getSha1('aaa')}
<script>
$.getJSON('${site.dynamicPath}api/method/getSha1?parameters=aaa', function(data){
console.log(data);
});
</script>
参数列表
返回结果
string:sha256值${getSha256('aaa')}
<script>
$.getJSON('${site.dynamicPath}api/method/getSha256?parameters=aaa', function(data){
console.log(data);
});
</script>
参数列表
返回结果
string:sha512值${getSha512('aaa')}
<script>
$.getJSON('${site.dynamicPath}api/method/getSha512?parameters=aaa', function(data){
console.log(data);
});
</script>
参数列表
返回结果
sitefile:
${(getSitefile('aaa-site.zip').name)!}
<script>
$.getJSON('${site.dynamicPath}api/method/getSitefile?appToken=接口访问授权Token¶meters=aaa-site.zip', function(data){
console.log(data);
});
</script>
返回结果
string 词典忽略分词${getSkipWord()}
<script>
$.getJSON('${site.dynamicPath}api/method/getRandom?appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
参数列表
number:睡眠时间0-60秒返回结果
boolean:是否睡眠${getSleep(5)}
参数列表
返回结果
string:解析结果${getTemplateResult('${.now}')}
<script>
$.getJSON('${site.dynamicPath}api/method/getDate?appToken=接口访问授权Token¶meters=${.now}', function(data){
console.log(data);
});
</script>
参数列表
返回结果
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>
返回结果
string:随机uuid${getUUID()}
<script>
$.getJSON('${site.dynamicPath}api/method/getUUID', function(data){
console.log(data);
});
</script>
参数列表
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>
参数列表
string:xml文本返回结果
xml:xml模型${getXml('<xml><data>value</data></xml>').xml.data}