判断data.tag不为null
<#if data.tag??>
</#if>
判断data.tag不为null且不为空字符串""
<#if data.tag?? && data. tag!= "">
</#if>
判断data.is_top不为null且等于1
<#if data.is_top?? && data. is_top == 1>
</#if>
获取列表imageList的长度
${data.imageList?size}
多次替换后台返回值的特殊字符并分隔为数组
<#list data.tag?replace(",",",")?replace(";", ",")?replace(";", ",")?split(",") as t>
<span>${t}</span>
</#list>
if elseif else判断
<#if data.tag??"">
${data.tag}
<#elseif data.name??>
${data.name}
<#else>
${data.name1}
</#if>
隐藏电话号码中间四位
${data.phone?substring(0,3)+"****"+data.phone?substring(7,11)}
网友评论