// Generated by CoffeeScript 1.8.0
(function() {
  var  loadData;
  loadData = function() {
    var item, swp,top;
    item = $("#itemTpl")[0].innerHTML;
    swp = new $.compent.swiper("#meetingList", {
      tpl: item,
      refreshEnabled: false,
    });
    swp.convert();
    swp.dataSource = function(pageIndex, s, opt) {
      return Ajax({
        url: baseUrl + '/api/meeting/list.do',
        data: {
          pageIndex: pageIndex
        },
        callback: function(res) {
			$.each(res.datas,function(idx,item){
				if(item.mthumbnail===null||item.mthumbnail===""||item.mthumbnail===undefined){
					item.mthumbnail="../../static/images/nopic.png";
				}else{
					item.mthumbnail = item.mthumbnail
				}
      	    });
          swp.dataList(res.datas);
        },
        error: function(res) {
          opt['timeStatu'] = res.status;
          return swp.timeOut();
        }
      });
    };
    return swp.initData();
  };
  $(function() {
	  $("#text").html("会议列表");
    loadData();
    $(document).on("click", ".meetlist", function() {
  	  return location.href = "./detail.html?meetingId=" + $(this).data("id");
  	});

   
  });
}).call(this);
