(function(win, $) { infotoday(); var $infolist = $('#kblist'); var infolisttmpl = util.clearhtml($("#todaylist-tmpl").html()); var m = mustache; m.parse(infolisttmpl); //获取今日项目数据 function infotoday() { $.ajax({ url: '/bigfileuploadstorage/kaibiao.json', /* url: '/json/kaibiao.json', */ type: 'get', datatype: 'json' }) .done(function(data) { var msg=data.kblist; $.each(msg, function(index,el) { el.usetime = el.usetime.substring(11); }); renderlist(msg); }) .fail(function() { console.log("error"); }); } //渲染数据 function renderlist(data){ $infolist.append(m.render(infolisttmpl, { items: data })); if(data.length > 7){ // 今日开标 new marquee({ msclassid: "hottitle2", contentid: "ulid2", direction: "top", step: 1, width: 220, height: 180, timer: 50, delaytime: 0, waittime: 0, scrollstep: 0, autostart: 1 }); } } }(this, jquery));