quest.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <extend name="Public:pinduoduobase" />
  2. <block name="content">
  3. <link rel="stylesheet" href="__PUBLIC__/pinduoduo/assets/css/suggestion_5d26e47e48fe43d546da6e44b3a131a1.css">
  4. <div class="suggestion-wrap">
  5. <div class="suggestion-header">常见问题</div>
  6. <div class="suggestion-body">
  7. <div class="suggestion-list" id="tuan_list">
  8. <?php
  9. if(!empty($list)) {
  10. ?>
  11. <volist name="list" id="d">
  12. <div class="suggestion-one" onclick="location.href='{:U('User/quest_detail', array('blog_id' => $d['blog_id']))}';">
  13. <div class="suggestion-title">{$d.title}</div>
  14. <div class="suggestion-arrow">
  15. <img src="__PUBLIC__/pinduoduo/assets/img/home_arrow-0417024bbe.png">
  16. </div>
  17. </div>
  18. </volist>
  19. <?php } ?>
  20. </div>
  21. </div>
  22. </div>
  23. <include file="Widget:pin_notify" />
  24. <div class="center" id="center_pullup" style="display:none;">
  25. <span><img class="img_rotate" src="__PUBLIC__/pinduoduo/assets/img/pull_loading_8eba142.png"/>
  26. </span><span class="orders_text"></span>
  27. </div>
  28. <style>
  29. .suggestion-body{margin-top:45px;}
  30. .coupon-tabbar .coupon-tab {
  31. width:49%;
  32. }
  33. .center {
  34. width: 170px;
  35. margin: 0 auto;
  36. text-align: center;
  37. }
  38. .img_rotate {
  39. width: 30px;
  40. height: 30px;
  41. margin-top: 7px;
  42. margin-right: 5px;
  43. -webkit-animation: loading 1s linear 0s infinite;
  44. }
  45. @-webkit-keyframes loading {
  46. 0% {
  47. -webkit-transform: rotate(0);
  48. }
  49. 100% {
  50. -webkit-transform: rotate(360deg);
  51. }
  52. }
  53. .orders_text {
  54. line-height: 45px;
  55. font-weight: 700;
  56. font-size: 15px;
  57. }
  58. </style>
  59. <script>
  60. var offset = 0;
  61. var _pa = 2;
  62. var is_can_next = 1;
  63. var cur_url = "{:U('User/quest')}";
  64. var req_step = 1;
  65. function loaddata()
  66. {
  67. var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); //浏览器的高度加上滚动条的高度
  68. if ($(document).height() <= totalheight+200) //当文档的高度小于或者等于总的高度的时候,开始动态加载数据
  69. {
  70. if(is_can_next == 1)//加载数据
  71. {
  72. is_can_next = 0;
  73. nextpage();
  74. }
  75. }
  76. }
  77. function nextpage()
  78. {
  79. $('#center_pullup').show();
  80. $.ajax(
  81. {
  82. url: cur_url,
  83. type:'post',
  84. data:{page:_pa},
  85. dataType: 'json',
  86. success: function(result){
  87. if(result.code == 1)
  88. {
  89. $('#tuan_list').append(result.html);
  90. $('#center_pullup').hide();
  91. _pa++;
  92. is_can_next = 1;
  93. } else if(result.code == 0) {
  94. $('#center_pullup').remove();
  95. }
  96. }
  97. }
  98. );
  99. }
  100. $(function(){
  101. $(window).scroll( function() {
  102. loaddata();
  103. });
  104. })
  105. </script>
  106. </block>