You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

232 lines
6.7 KiB

2 years ago
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>社团网站</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="<%=basePath%>home/css/swiper.min.css">
<link rel="stylesheet" href="<%=basePath%>home/css/bootstrap.min.css">
<link rel="stylesheet" href="<%=basePath%>home/css/app.css">
<link rel="stylesheet" href="<%=basePath%>home/css/app_web.css">
<script type="text/javascript" src="<%=basePath%>home/js/jquery1.12.4.min.js"></script>
<script type="text/javascript" src="<%=basePath%>home/js/jquery.SuperSlide.2.1.3.js"></script>
<script type="text/javascript" src="<%=basePath%>home/js/swiper.min.js"></script>
<script type="text/javascript" src="<%=basePath%>home/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(function(){
loadsearch('');
loadfenlei();
})
var fenleicom='';
var page=1,rows=10;
function loadsearch(fenleiids)
{
var where=" and fenleiid in (8,9) ";
fenleicom=fenleiids;
$.ajax({
type: "post",
url: "HomeServlet?method=XinWenlist",
dataType:'json',
async:false,
data:{
fenleiid:fenleiids,
page:page,
rows:rows,
where:where
},
success: function(data){
var totalhtml='';
for(var i=0;i<data.rows.length;i++)
{
var neirong=data.rows[i]["neirong"];
if(neirong.length>100)
{
neirong=neirong.substring(0,50);
}
else
{
}
totalhtml+=' <li>'+
'<a href="<%=basePath%>home/newsdetails.jsp?id='+data.rows[i]["id"]+'"><img style="width:445px;height:280px;" src="pic/'+data.rows[i]["tupian"]+'" alt=""></a>'+
'<div class="text">'+
'<a href="<%=basePath%>home/newsdetails.jsp?id='+data.rows[i]["id"]+'"><h2>'+data.rows[i]["title"]+'</h2></a>'+
'<p>'+neirong+'</p>'+
' <a href="<%=basePath%>home/newsdetails.jsp?id='+data.rows[i]["id"]+'" class="xiangq"></a>'+
'</div>'+
' </li>';
}
$('#newslist').html(totalhtml);
}
});
}
function home()
{
page=1;
loadsearch(fenleicom);
}
function pre()
{
page=parseInt(page)-parseInt(1);
loadsearch(fenleicom);
}
function next()
{
page=parseInt(page)+parseInt(1);
loadsearch(fenleicom);
}
function loadfenlei()
{
var where=" and id in (4,5) ";
$.ajax({
type: "post",
url: "HomeServlet?method=fenleilist",
dataType:'json',
data:{
where:where
},
success: function(data){
var totalhtml='';
for(var i=0;i<data.rows.length;i++)
{
totalhtml+='<a href="javascript:void(0)" onclick="loadsearch('+data.rows[i]["id"]+')" >'+data.rows[i]["name"]+'</a>';
//class="no"
}
$('#fenleilist').html(totalhtml);
}
});
}
</script>
</head>
<body>
<jsp:include page="${basePath}/home/head.jsp" flush="true"/>
<div class="knag_top"></div>
<!-- banner -->
<div class="shouye_qiehuant" style="height:450px;">
<div class="swiper-wrapper">
<div class="swiper-slide"><a href="#"><img src="<%=basePath%>home/images/banner_ge.jpg" alt=""></a></div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
</div>
<!-- Initialize Swiper -->
<script>
var swiper = new Swiper('.shouye_qiehuant', {
pagination: {
el: '.swiper-pagination',
},
});
</script>
<!-- 子页 -->
<div class="kuang_ping_nwes">
<div class="px1200 nimen_news">
<div class="shouye_biapt clas_news_bt">
<div class="mingz_news">公司新闻<span><a href="javascript:void(0)" onclick="home()">首页</a>><a href="">新闻中心</a> >新闻详情</span></div>
</div>
<div class="yao_meng">
<div id="fenleilist">
<!--
<a href="javascript:;" class="no">行业新闻</a>
-->
</div>
<script>
$(function(){
$(".yao_meng a").mousedown(function(){
$(".yao_meng a").removeClass("no")
$(this).addClass("no")
})
})
</script>
</div>
<!-- -->
<div class="news_list_ziye">
<ul id="newslist">
<!--
<li>
<a href="news_xq.html"><img src="<%=basePath%>home/images/news_img1.jpg" alt=""></a>
<div class="text">
<a href="news_xq.html"><h2>狗皮膏药,专业治疗疑难杂症</h2></a>
<p>李铁拐在民间影响很大,但主要是与其他七仙作为一个群体——八仙出现的。大概是因为传说他身背的大葫芦,有治病救人的灵丹妙药,过去民间特别是医药行把他作为狗皮膏药的发明者和祖师爷。李铁拐在民间影响很大,但主要是与其他七仙作为一个群体——八仙出现的。大概是因为传说他身背的大葫芦,有治病救人的灵丹妙药,过去民间特别是医药行把他作为狗皮膏药的发明者和祖师爷。李铁拐在民间影响很大,但主要是与其他七仙作为一个群体——八仙出现的。大概是因为传说他身背的大葫芦,有治病救人的灵丹妙药,过去民间特别是医药行把他作为狗皮膏药的发明者和祖师爷。</p>
<a href="news_xq.html" class="xiangq">查看详情>></a>
</div>
</li>
-->
</ul>
</div>
</div>
</div>
<div class="fanye_kang_ss">
<a class="no" href="javascript:void(0)" style="width:60px;" onclick="pre()">上一页</a>
<a class="no" href="javascript:void(0)" style="width:60px;" onclick="next()">下一页</a>
</div>
<jsp:include page="${basePath}/home/foot.jsp" flush="true"/>
</body>
</html>