类 CmsWordListDirective
java.lang.Object
com.publiccms.common.directive.BaseTemplateDirective
com.publiccms.common.base.AbstractTemplateDirective
com.publiccms.views.directive.cms.CmsWordListDirective
- 所有已实现的接口:
Directive,HttpDirective,freemarker.template.TemplateDirectiveModel,freemarker.template.TemplateModel
wordList 用户投票列表查询指令
上下文变量
lang:语言
参数列表
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:PageHandlerpage.list:List类型 查询结果实体列表CmsWord
使用示例
<#assign lang="cn"/> <@cms.wordList userId=1 pageSize=10><#list page.list as a>${a.ip}<#sep>,</#list></@cms.wordList>
<script>
fetch('${site.dynamicPath}api/directive/cms/wordList?userId=1&pageSize=10',{"headers":{"lang":"cn"}}).then(res => res.json()).then(data=>{
console.log(data.page.totalCount);
});
</script>
-
字段概要
字段从类继承的字段 com.publiccms.common.base.AbstractTemplateDirective
ADVANCED, APP_TOKEN, AUTH_TOKEN, AUTH_USER_ID, siteComponent从类继承的字段 com.publiccms.common.directive.BaseTemplateDirective
log从接口继承的字段 freemarker.template.TemplateModel
NOTHING -
构造器概要
构造器 -
方法概要
从类继承的方法 com.publiccms.common.base.AbstractTemplateDirective
execute, expose, getAdvanced, getApp, getSite, getUser, getUserId, needAppToken, needUserToken从类继承的方法 com.publiccms.common.directive.BaseTemplateDirective
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
-
字段详细资料
-
service
-
siteAttributeComponent
-
-
构造器详细资料
-
CmsWordListDirective
public CmsWordListDirective()
-
-
方法详细资料
-
execute
public void execute(RenderHandler handler) throws IOException, freemarker.template.TemplateException - 参数:
handler-- 抛出:
IOExceptionfreemarker.template.TemplateException
-
supportAdvanced
public boolean supportAdvanced()- 覆盖:
supportAdvanced在类中AbstractTemplateDirective- 返回:
- support advanced parameters
-