2021-11-15 23:51:08 +08:00
|
|
|
|
{extend name="common/base"/}
|
|
|
|
|
{block name="style"}
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
.latest-news{padding-top: 12px; padding-bottom:30px; padding-left: 20px; position: relative;}
|
|
|
|
|
.latest-news .layui-timeline-title{padding-bottom:0; font-size: 14px;}
|
|
|
|
|
.latest-news .layui-timeline-item{padding-bottom:5px;}
|
|
|
|
|
.layui-timeline-title span{color:#999}
|
2021-11-29 16:04:07 +08:00
|
|
|
|
.panel-more{width: 100%; height:48px; line-height: 48px; text-align: center; position: absolute; bottom: 0; left:0;}
|
2021-11-15 23:51:08 +08:00
|
|
|
|
.panel-more a{color:#0088FF}
|
|
|
|
|
</style>
|
|
|
|
|
{/block}
|
|
|
|
|
<!-- 主体 -->
|
|
|
|
|
{block name="body"}
|
|
|
|
|
<div class="body-content" style="padding: 20px;">
|
2021-11-29 16:04:07 +08:00
|
|
|
|
<div class="h3-title">员工动态</div>
|
2021-11-15 23:51:08 +08:00
|
|
|
|
<div class="latest-news">
|
2021-11-29 16:04:07 +08:00
|
|
|
|
<ul class="layui-timeline" id="logs"></ul>
|
2021-11-15 23:51:08 +08:00
|
|
|
|
<div class="panel-more"><a href="javascript:getLogs();">查看更多动态</a></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/block}
|
|
|
|
|
<!-- /主体 -->
|
|
|
|
|
|
|
|
|
|
<!-- 脚本 -->
|
|
|
|
|
{block name="script"}
|
|
|
|
|
<script>
|
|
|
|
|
var page=1,limit=20;
|
|
|
|
|
function getLogs() {
|
|
|
|
|
$.ajax({
|
2021-12-05 00:23:33 +08:00
|
|
|
|
url: "/home/api/get_log_list",
|
2021-11-15 23:51:08 +08:00
|
|
|
|
type: 'post',
|
|
|
|
|
data: {
|
|
|
|
|
page:page,
|
|
|
|
|
limit: limit
|
|
|
|
|
},
|
|
|
|
|
success: function(e) {
|
|
|
|
|
if (e.code == 0) {
|
|
|
|
|
var html = '';
|
|
|
|
|
if(e.data.length>0){
|
|
|
|
|
page++;
|
|
|
|
|
$.each(e.data, function(key, value) {
|
|
|
|
|
html += '<li class="layui-timeline-item">\
|
|
|
|
|
<i class="layui-icon layui-timeline-axis"></i>\
|
|
|
|
|
<div class="layui-timeline-content layui-text">\
|
|
|
|
|
<div class="layui-timeline-title"><span title="'+value.id+'">'+value.times+'</span>,'+value.content+'</div>\
|
|
|
|
|
</div>\
|
|
|
|
|
</li>';
|
|
|
|
|
});
|
|
|
|
|
$('#logs').append(html);
|
|
|
|
|
}else{
|
|
|
|
|
$('.panel-more').remove();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
getLogs();
|
|
|
|
|
</script>
|
|
|
|
|
{/block}
|
|
|
|
|
<!-- /脚本 -->
|