@Component public class VisitItemDirective extends AbstractTemplateDirective
参数列表
visitDate
:访问日期,【2020-01-01】
itemType
:访问项目类型,【category,content,user等页面统计时中的itemType】
itemId
:访问项目id,三个参数都不为空时,结果返回object
VisitItem
<@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>
限定符和类型 | 字段和说明 |
---|---|
private VisitItemService |
service |
ADVANCED, AUTH_TOKEN, AUTH_USER_ID, siteComponent
log
构造器和说明 |
---|
VisitItemDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
boolean |
needAppToken() |
execute, expose, getAdvanced, getApp, getSite, getUserId, needUserToken, supportAdvanced
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private VisitItemService service
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException
public boolean needAppToken()
needAppToken
在类中 AbstractTemplateDirective