tuanyuan.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <extend name="Public:pinduoduobase" />
  2. <block name="content">
  3. <link rel="stylesheet" href="__PUBLIC__/pinduoduo/assets/css/tuanbonus.css">
  4. <div id="main">
  5. <div class="list-myorder">
  6. <ul class="ul-product" id="order_list">
  7. <?php foreach($list as $val){ ?>
  8. <li>
  9. <span class="pic">
  10. <img src="<?php echo $val['avatar']; ?>">
  11. </span>
  12. <div class="text">
  13. <span class="pro-name">昵称:<?php echo $val['uname']; ?></span>
  14. <div class="pro-pric"><span>关注时间:</span><?php echo $val['create_time'];?></div>
  15. <div class="pro-pric"><span>推荐上级:</span><?php echo $val['parent_name']; ?></div>
  16. </div>
  17. </li>
  18. <?php } ?>
  19. </ul>
  20. </div>
  21. </div>
  22. <div class="center" id="center_pullup" style="display:none;">
  23. <span><img class="img_rotate" src="__PUBLIC__/pinduoduo/assets/img/pull_loading_8eba142.png"/>
  24. </span><span class="orders_text"></span>
  25. </div>
  26. <div style="height:49px;"></div>
  27. <include file="Public:foot_pinduoduo" />
  28. <style>
  29. .list-myorder {
  30. margin: 10px 15px 10px 15px;
  31. border: 1px solid #d9d9d9;
  32. border-radius: 3px;
  33. box-shadow: 0 2px 2px rgb(230,230,230);
  34. font-size: 14px;
  35. }
  36. .list-myorder .ul-product {
  37. margin: 5px 15px;
  38. line-height: 1.2;
  39. }
  40. .list-myorder li {
  41. padding: 10px 0;
  42. list-style: none;
  43. border-bottom: 1px dotted #ccc;
  44. overflow: hidden;
  45. }
  46. .list-myorder .pic {
  47. float: left;
  48. width: 70px;
  49. height: 70px;
  50. margin-right: 10px;
  51. padding: 1px;
  52. border: 1px solid #ccc;
  53. border-radius: 3px;
  54. }
  55. .list-myorder .pic img {
  56. width: 100%;
  57. height: 100%;
  58. }
  59. .list-myorder .text {
  60. overflow: hidden;
  61. font-size: 14px;
  62. }
  63. .list-myorder .pro-name {
  64. color: #333;
  65. font-size: 14px;
  66. }
  67. .list-myorder .pro-pric {
  68. margin-top: 5px;
  69. color: #333;
  70. font-size: 14px;
  71. }
  72. .list-myorder .pro-pric span {
  73. font-size: 14px;
  74. color: #999;
  75. }
  76. .list-myorder .pro-pric {
  77. margin-top: 5px;
  78. color: #333;
  79. font-size: 14px;
  80. }
  81. .list-myorder .pro-pric span {
  82. font-size: 14px;
  83. color: #999;
  84. }
  85. .center {
  86. width: 170px;
  87. margin: 0 auto;
  88. text-align: center;
  89. }
  90. .img_rotate {
  91. width: 30px;
  92. height: 30px;
  93. margin-top: 7px;
  94. margin-right: 5px;
  95. -webkit-animation: loading 1s linear 0s infinite;
  96. }
  97. @-webkit-keyframes loading {
  98. 0% {
  99. -webkit-transform: rotate(0);
  100. }
  101. 100% {
  102. -webkit-transform: rotate(360deg);
  103. }
  104. }
  105. .orders_text {
  106. line-height: 45px;
  107. font-weight: 700;
  108. font-size: 15px;
  109. }
  110. </style>
  111. <script>
  112. var offset = 0;
  113. var _pa = 2;
  114. var is_can_next = 1;
  115. var cur_url = "{:U('Spike/index')}";
  116. var type = "{$type}";
  117. var req_step = 1;
  118. function loaddata()
  119. {
  120. var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); //浏览器的高度加上滚动条的高度
  121. if ($(document).height() <= totalheight+200) //当文档的高度小于或者等于总的高度的时候,开始动态加载数据
  122. {
  123. if(is_can_next == 1)//加载数据
  124. {
  125. is_can_next = 0;
  126. nextpage();
  127. }
  128. }
  129. }
  130. function nextpage()
  131. {
  132. $('#center_pullup').show();
  133. $.ajax(
  134. {
  135. url: "{:U('tuanbonus/tuanyuan')}",
  136. type:'get',
  137. data:{page:_pa,type:type},
  138. dataType: 'json',
  139. success: function(result){
  140. if(result.code == 1)
  141. {
  142. $('#order_list').append(result.html);
  143. $('#center_pullup').hide();
  144. _pa++;
  145. is_can_next = 1;
  146. } else if(result.code == 0) {
  147. $('#center_pullup').hide();
  148. is_can_next = 0;
  149. $('#center_pullup').remove();
  150. }
  151. }
  152. }
  153. );
  154. }
  155. $(function(){
  156. nextpage();
  157. $(window).scroll( function() {
  158. loaddata();
  159. });
  160. })
  161. </script>
  162. </block>