代码说明,页面是用freemarker写的,newsModel.list 是所有的数据;
<ul class="affair_list" pagesize="3"> 这句是关键
<#if type=='news'>
<ul class=" affair_list" pagesize="3"><#if newsModel?? && newsModel.list??> <#list
newsModel.list as list>
<li><a href="javascript:void(0);"
οnclick="newsD(${list.id})">
<div class="datetime">
<p class="day">
<span class="">${list.publishDate?string('dd')!''}</span>
</p>