@Component public class VisitUrlDirective extends AbstractTemplateDirective
参数列表
visitDate
:访问日期,【2020-01-01】
urlMd5
:访问网址md5
urlSha
:访问网址sha,三个参数都不为空时,结果返回object
VisitUrl
<@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>
限定符和类型 | 字段和说明 |
---|---|
private VisitUrlService |
service |
ADVANCED, AUTH_TOKEN, AUTH_USER_ID, siteComponent
log
构造器和说明 |
---|
VisitUrlDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
boolean |
needAppToken() |
execute, expose, getAdvanced, getApp, getSite, getUserId, needUserToken, supportAdvanced
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private VisitUrlService service
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException
public boolean needAppToken()
needAppToken
在类中 AbstractTemplateDirective