// 轮播 'use strict'; var target = $('.news-list .items'); var tpl = '\n {{each list}}\n \n
\n {{$value.date}}\n \n
\n
{{$value.title}}
\n
{{$value.desc}}
\n
\n {{/each}}\n'; var page = new page({ url: window.urls.partylist, moreelement: '#newsmore', morecallback: function morecallback(data) { renderdata(data); } }); page.init().then(function (data) { return renderdata(data); }); function renderdata(data) { target.append(template.render(tpl, { list: data.list })); }