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.

86 lines
3.4 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  2. <title><?php echo $post['name']; ?></title><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
  3. <link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
  4. <script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script><script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script>
  5. <meta name="keywords" content="<?php echo $post['keywords']; ?>"><meta name="description" content="<?php echo $post['description']; ?>"></head><body>
  6. <div class="classreturn loginsignup">
  7. <div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
  8. <div class="ds-in-bl tit center"><span><?php echo $post['name']; ?></span></div>
  9. <div class="ds-in-bl nav_menu"><a href="javascript:void(0);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/class1.png" alt="菜单"></a></div>
  10. </div>
  11. @include('weixin.common.headerNav')
  12. <div class="arc_list">
  13. <?php if($list){ ?>
  14. <ul class="arclist cl">
  15. <?php foreach($list as $k=>$v){ ?>
  16. <li><a href="<?php echo $v['article_detail_url']; ?>"><?php echo $v['title']; ?></a><p><?php echo $v['pubdate']; ?></p></li>
  17. <?php } ?>
  18. </ul>
  19. <?php }else{ ?>
  20. <div style="text-align:center;line-height:40px;color:#999;">暂无记录</div>
  21. <?php } ?>
  22. </div>
  23. <script>
  24. $(function(){
  25. var ajaxload = false;
  26. var maxpage = false;
  27. var startpage = 1;
  28. var totalpage = <?php echo $totalpage; ?>;
  29. var tmp_url = window.location.href;
  30. msg = tmp_url.split("#");
  31. tmp_url = msg[0];
  32. $(window).scroll(function ()
  33. {
  34. var listheight = $(".arclist").outerHeight();
  35. if ($(document).scrollTop() + $(window).height() >= listheight)
  36. {
  37. if(startpage >= totalpage)
  38. {
  39. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  40. return false;
  41. }
  42. if(!ajaxload && !maxpage)
  43. {
  44. ajaxload = true;
  45. //$("#submit_bt_one").html("努力加载中...");
  46. var url = tmp_url;
  47. var nextpage = startpage+1;
  48. $.get(url,{page_ajax:1,page:nextpage},function(res)
  49. {
  50. if(res)
  51. {
  52. $(".arclist").append(res);
  53. startpage++;
  54. if(startpage >= totalpage)
  55. {
  56. maxpage = true;
  57. //$("#submit_bt_one").html("已是最后一页,没有更多数据!");
  58. }
  59. else
  60. {
  61. //$("#submit_bt_one").html("点击加载更多");
  62. }
  63. ajaxload = false;
  64. }
  65. else
  66. {
  67. //$("#submit_bt_one").html("请求失败,请稍候再试!");
  68. ajaxload = false;
  69. }
  70. },'json');
  71. }
  72. }
  73. });
  74. });
  75. </script>
  76. @include('weixin.common.footer')
  77. </body></html>