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.

65 lines
2.5 KiB

7 years ago
  1. <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /><meta name="viewport" content="width=device-width,initial-scale=1.0">
  2. <title><?php echo $post["title"]; ?>_<?php echo sysconfig('CMS_WEBNAME'); ?></title><link rel="stylesheet" href="/css/wap.css" media="all"><script type="text/javascript" src="/js/jquery.min.js"></script></head><body>
  3. <header class="mheader-a"><h2 class="bt"><?php echo sysconfig('CMS_WEBNAME'); ?></h2><a href="javascript:;"><div class="phone-icon telphone"></div></a></header>
  4. @include('wap.common.header')
  5. <article class="mbanner-b mb10"><a href=""><img src="/images/banner.jpg"></a></article>
  6. <article class="mbox cinfo"><h1 class="tith"><?php echo $post["title"]; ?></h1>
  7. <div class="mabout-a"><p>时间:<?php echo date("Y-m-d",$post["pubdate"]); ?></p><?php echo $post["body"]; ?>
  8. <br>下一篇:<?php if($pre){ ?><a href="<?php echo get_front_url(array("id"=>$pre['id'],"type"=>'content')); ?>"><?php echo $pre["title"]; ?></a><?php }else{echo '没有了';} ?></div></article>
  9. <article class="mbox"><h3 class="tit"><i class="tit_icon"></i>相关推荐</h3><ul class="mnews-b" id="ajlist"><?php $posts=arclist(array("row"=>5,"typeid"=>$post["typeid"],"orderby"=>'rand()'));foreach($posts as $row){ ?>
  10. <li><span class="group">[<?php echo date("Y-m-d",$row['pubdate']); ?>]</span><a href="<?php echo get_front_url(array("id"=>$row['id'],"type"=>'content')); ?>"><?php echo $row['title']; ?></a></li><?php } ?>
  11. </ul><div class="about-more more mt10"><a id="listbu" href="javascript:;">查看更多<i class="phone-icon mico"></i></a></div></article>
  12. <script>
  13. $(function(){
  14. var page = 2;
  15. $('#listbu').click(function(){
  16. $.ajax({
  17. url: "<?php echo route('api_listarc'); ?>",
  18. dataType: "json",
  19. type: "POST",
  20. data: {
  21. "_token":'{{ csrf_token() }}',
  22. "typeid":<?php echo $post["typeid"] ?>,
  23. "PageIndex":page,
  24. "PageSize":5
  25. },
  26. success: function(data){
  27. if(data.code==0)
  28. {
  29. var json = data.data; //数组
  30. var str = '';
  31. $.each(json, function (index) {
  32. //循环获取数据
  33. var title = json[index].title;
  34. var id = json[index].id;
  35. var url = json[index].url;
  36. var pubdate = json[index].pubdate;
  37. str = str + '<li><span class="group">['+pubdate+']</span><a href="'+url+'" target="_blank">'+title+'</a></li>';
  38. });
  39. if(str!='')
  40. {
  41. $('#ajlist').append(str);
  42. }
  43. else
  44. {
  45. $('#listbu').text("亲,没有啦!");
  46. }
  47. }
  48. else
  49. {
  50. }
  51. }
  52. });
  53. page++;
  54. });
  55. });
  56. </script>
  57. </body></html>