代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公司新闻-北京华腾橡塑乳胶制品有限公司</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/all.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="flex-container news">
#include('inc/top.html')
<div class="container-fluid">
<div class="intobg"></div>
</div>
<div class="container text-center pb-2">
<h2 class="product-title">公司新闻</h2>
<p class="product-subtitle">Company News</p>
</div>
#--#ArticleEnhancePage(categoryId=1,tagid=2,where=C.get("year") && C.get("year")!="all"?" where date_format(created,'%Y') = '"+C.get("year")+"'":null)--#
<div class="container-fluid eq-bg">
<div class="container pt-4 mb-3">
<div class="row newslist">
<div class="col-9 line">
<form>
<div class="form-row">
<div class="col-4">
<select class="form-control" name="year" id="year">
<option value="0">所有年份</option>
#ArticlePageCustomSQLPage(sql="SELECT DATE_FORMAT(modified,'%Y')as y FROM article GROUP BY DATE_FORMAT(modified,'%Y')")
#for(e : ArticlePageCustomSQLPage.list)
<option value="#(e.y)">#(e.y)</option>
#end
#end
</select>
</div>
<div class="col-4">
<input type="button" value="查询" onclick="find('year');" class="btn btn-primary">
</div>
</div>
</form>
<ul id="app">
<li v-for="entry in list">
<a :href="entry.url">{{ entry.title }}</a>
<span>{{ entry.created }}</span>
<p class="content" v-html="entry.summary"></p>
</li>
</ul>
<a href="javascript:next()" class="btn btn-outline-primary">加载更多 <i class="fas fa-plus-square"></i></a>
</div>
<div class="col-3 text-secondary pl-4">
<!--<h4>北京华腾橡塑乳胶制品有限公司</h4>
<p class="title">乳胶</p>
<p>电话:+86-10-815025533</p>
<p>+86-10-81502536</p>
<p>传真:+86-10-81502534</p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
<p><br></p>
<p class="title">橡胶(主要类型的塑料片材,制品,钓鱼靴,钓鱼裤)</p>
<p>电话:+86-10-81501071</p>
<p>+86-10-81501073</p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
<p><a href="mailto:[email protected]">[email protected]</a></p>
<p><a href="mailto:[email protected]">[email protected]</a></p>-->
#ArticleEnhancePage(categoryId=9,pageSize=3)
#for(article : ArticleEnhancePage.list)
<div>
<p class="title">#(article.title ??)</p>
<div>
#(article.content ??)
</div>
</div>
<hr>
#end
#end
</div>
</div>
</div>
</div>
</div>
<!--bottom-->
#include('inc/footer.html')
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
var page = 1;
var pageMax;
var app = new Vue({
el: '#app',
data: {
list:[]
}
});
function find(id){
page = 1
app.list=[];
getdata(page,$("#"+id).val());
}
function next(year){
page++;
getdata(page,year);
}
function getdata(p,year){
var url = "/articleWebApi/getJsonWhereYear";
pm = {
page:p,
pageSize:5,
categoryId:1,
year:year
}
if(pageMax!="" && page > pageMax){
alert("没有更多数据了!")
return;
}
$.post(url,pm,function(e){
pageMax = e.totalPage;
for(var i in e.list){
app.list.push(e.list[i]);
}
});
}
getdata(1,null);
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。