ZLW-PC\Administrator
7 years ago
16 changed files with 526 additions and 429 deletions
-
2app/Http/Controllers/Api/ArticleController.php
-
16app/Http/Controllers/Api/GoodsController.php
-
1app/Http/Controllers/Api/SlideController.php
-
335app/Http/Controllers/Home/IndexController.php
-
7app/Http/Controllers/Weixin/ArticleController.php
-
20app/Http/Controllers/Weixin/GoodsController.php
-
1app/Http/Controllers/Weixin/IndexController.php
-
2app/Http/Model/Goods.php
-
1app/Http/Model/Slide.php
-
70lqycms.sql
-
20public/css/style.css
-
2resources/views/home/common/footer.blade.php
-
26resources/views/home/common/header.blade.php
-
73resources/views/home/index/arclist.blade.php
-
161resources/views/home/index/goodslist.blade.php
-
218resources/views/home/index/index.blade.php
70
lqycms.sql
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1 +1 @@ |
|||
<div id="footer" class="box">©<?php echo sysconfig('CMS_WEBNAME'); ?> 部分文章来源于网络,如果侵犯了您的权益,请联系我们。<div class="m-auto"><script>count_js();</script></div></div>
|
|||
<div id="footer"><div class="box">©<?php echo sysconfig('CMS_WEBNAME'); ?> 部分文章来源于网络,如果侵犯了您的权益,请联系我们。<div class="m-auto"><script>count_js();</script></div></div></div>
|
@ -1,13 +1,70 @@ |
|||
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> |
|||
<title><?php if($post){echo $post["name"].'_'.sysconfig('CMS_WEBNAME');}else{echo '动态';} ?></title><meta name="keywords" content="{dede:field.keywords/}" /><meta name="description" content="{dede:field.description function='html2text(@me)'/}" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/css/style.css"><script type="text/javascript" src="<?php echo sysconfig('CMS_BASEHOST'); ?>/js/ad.js"></script></head><body>
|
|||
<title><?php if(isset($post)){echo $post["name"].'_'.sysconfig('CMS_WEBNAME');}else{echo '动态';} ?></title><meta name="keywords" content="{dede:field.keywords/}" /><meta name="description" content="{dede:field.description function='html2text(@me)'/}" /><link rel="stylesheet" href="<?php echo sysconfig('CMS_BASEHOST'); ?>/css/style.css"><script type="text/javascript" src="<?php echo sysconfig('CMS_BASEHOST'); ?>/js/ad.js"></script></head><body>
|
|||
@include('home.common.header') |
|||
|
|||
<div class="box" style="padding-top:20px;"> |
|||
<?php if(!empty($posts)){foreach($posts as $row){ ?><div class="list"><?php if(!empty($row['litpic'])){ ?><a class="limg" href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><img alt="<?php echo $row['title']; ?>" src="<?php echo $row['litpic']; ?>"></a><?php } ?>
|
|||
<strong class="tit"><a href="<?php echo get_front_url(array("id"=>$row['id'],"catid"=>$row['typeid'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></strong><p><?php echo mb_strcut($row['description'],0,150,'UTF-8'); ?>..</p>
|
|||
<div class="info"><span class="fl"><?php $taglist=taglist($row['id']);if($taglist){foreach($taglist as $row){ ?><a href="<?php echo get_front_url(array("tagid"=>$row['id'],"type"=>'tags')); ?>"><?php echo $row['tag']; ?></a><?php }} ?><em><?php echo date("m-d H:i",$row['pubdate']); ?></em></span><span class="fr"><em><?php echo $row['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php }} ?>
|
|||
<div class="box" style="padding-top:20px;" id="arclist"> |
|||
<?php if($list){foreach($list as $k=>$v){ ?><div class="list"><?php if(!empty($v['litpic'])){ ?><a class="limg" href="<?php echo get_front_url(array("id"=>$v['id'],"catid"=>$v['typeid'],"type"=>'content')); ?>"><img alt="<?php echo $v['title']; ?>" src="<?php echo $v['litpic']; ?>"></a><?php } ?>
|
|||
<strong class="tit"><a href="<?php echo get_front_url(array("id"=>$v['id'],"catid"=>$v['typeid'],"type"=>'content')); ?>"><?php echo $v['title']; ?></a></strong><p><?php echo mb_strcut($v['description'],0,150,'UTF-8'); ?>..</p>
|
|||
<div class="info"><span class="fl"><?php $taglist=taglist($v['id']);if($taglist){foreach($taglist as $row){ ?><a href="<?php echo get_front_url(array("tagid"=>$row['id'],"type"=>'tags')); ?>"><?php echo $row['tag']; ?></a><?php }} ?><em><?php echo date("m-d H:i",$v['pubdate']); ?></em></span><span class="fr"><em><?php echo $v['click']; ?></em>人阅读</span></div><div class="cl"></div></div><?php }} ?>
|
|||
</div> |
|||
|
|||
<?php if($pagenav){ ?><div class="pages"><ul><li style="width:180px;"><a href="<?php echo $pagenav; ?>">获取更多</a></li></ul><div class="cl"></div></div><?php } ?>
|
|||
|
|||
<script> |
|||
$(function(){ |
|||
var ajaxload = false; |
|||
var maxpage = false; |
|||
var startpage = 1; |
|||
var totalpage = <?php echo $totalpage; ?>;
|
|||
|
|||
var tmp_url = window.location.href; |
|||
msg = tmp_url.split("#"); |
|||
tmp_url = msg[0]; |
|||
|
|||
$(window).scroll(function () |
|||
{ |
|||
var listheight = $("#arclist").outerHeight(); |
|||
|
|||
if ($(document).scrollTop() + $(window).height() >= listheight) |
|||
{ |
|||
if(startpage >= totalpage) |
|||
{ |
|||
//$("#submit_bt_one").html("已是最后一页,没有更多数据!");
|
|||
return false; |
|||
} |
|||
|
|||
if(!ajaxload && !maxpage) |
|||
{ |
|||
ajaxload = true; |
|||
//$("#submit_bt_one").html("努力加载中...");
|
|||
var url = tmp_url; |
|||
var nextpage = startpage+1; |
|||
|
|||
$.get(url,{page_ajax:1,page:nextpage},function(res) |
|||
{ |
|||
if(res) |
|||
{ |
|||
$("#arclist").append(res); |
|||
startpage++; |
|||
|
|||
if(startpage >= totalpage) |
|||
{ |
|||
maxpage = true; |
|||
//$("#submit_bt_one").html("已是最后一页,没有更多数据!");
|
|||
} |
|||
else |
|||
{ |
|||
//$("#submit_bt_one").html("点击加载更多");
|
|||
} |
|||
|
|||
ajaxload = false; |
|||
} |
|||
else |
|||
{ |
|||
//$("#submit_bt_one").html("请求失败,请稍候再试!");
|
|||
ajaxload = false; |
|||
} |
|||
},'json'); |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
</script> |
|||
@include('home.common.footer')</body></html> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue