notice-details.js 1.39 KB
var contentpath;
$(document).ready(function () {
	contentpath =  global.contextPath;
	load();
});


function load(){
	var gid=$("#gid").val();

	var str="首页";
	var auxiliariesNumber; 
	$.post(global.contextPath + global.modelctls.homepage.homePageDetail, {
		gid : gid
	}, function(result) {	
		//$("#homepage_notice").children().filter('.div-content-list').remove();
		var data=result.Data;
		if(data==null){return;}
		var str = JSON.stringify(data);
		for(var i=0;i<data.length;i++){
			var map_result = data[i];
			var createtime= new Date(map_result["创建时间"]);
			var unit=map_result["创建单位"];
			if(unit==null){unit="暂无单位";}
			var docattachmentpath = map_result["附件路径"];	
			listFiles(docattachmentpath,"首页详情");
			var contentstr="<div>"
               +"<div class='div-notice-title'><span class='div-notice-type'>["+map_result["公告类型"]+"]</span>"+map_result["公告标题"]+"</div>"
               +"<div class='div-notice-attachment'><img src='../assets/images/index/icon-attachments.png' />附件(0)</div>"
               +"<div class='div-notice-time'>"+createtime.format("yyyy-MM-dd hh:mm:ss")+"</div>"
               +"<div class='div-notice-remove'><span class='glyphicon glyphicon-trash'></span></div>"
               +"<div class='clearboth'></div>"
               +"</div>";
			$(".div-notice-item").append(contentstr);	
		}
		//AnnouncementDetails();
});
	

	
}