【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
第一种方法:
<#escape x as x?html>
<#list list.content as item>
<tr>
<td><#if item.user??>${item.user.nickName!}</#if></td>
<td>
<#if item.type==1>
意见
<#elseif item.type==2>
投诉
<#elseif item.type==3>
屏蔽
</#if>
</td>
<td>${item.user.mobile!}</td>
<td>${item.appContentId!}</td>
<td>${item.contacts!}</td>
<td>${item.data!}</td>
<td>${item.appVersion!}</td>
<td>${item.requestSystem!}</td>
<td>${item.requestModel!}</td>
<td>${item.requestIp!}</td>
<td>${item.createdTime!}</td>
</#list>
</#escape>
需要加入的代码就是:
<#escape x as x?html>
</#escape>
第二种方法:
<#list list.content as item>
<tr>
<td><#if item.user??>${item.user.nickName!}</#if></td>
<td>
<#if item.type==1>
意见
<#elseif item.type==2>
投诉
<#elseif item.type==3>
屏蔽
</#if>
</td>
<td>${item.user.mobile!}</td>
<td>${item.appContentId!}</td>
<td>${item.contacts!}</td>
<td>${item.data!?html}</td>
<td>${item.appVersion!}</td>
<td>${item.requestSystem!}</td>
<td>${item.requestModel!}</td>
<td>${item.requestIp!}</td>
<td>${item.createdTime!}</td>
</#list>
多加入的代码是:?html
${item.data!?html}
来源:oschina
链接:https://my.oschina.net/654476371/blog/3145053