pinlist.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <extend name="Public:pinduoduobase" />
  2. <block name="content">
  3. <div class="container con no-footer">
  4. <div class="nav_fixed">
  5. <a class="fixed_nav_item_groups" onclick="location.href='{:U('Pingoods/pinlist')}'">
  6. <span class="nav_txt <?php if($type == 0){ ?>nav_cur<?php } ?>">全部</span>
  7. </a>
  8. <a class="fixed_nav_item_groups" onclick="location.href='{:U('Pingoods/pinlist',array('type' => 1))}'">
  9. <span class="nav_txt <?php if($type == 1){ ?>nav_cur<?php } ?>" >拼团中</span>
  10. </a>
  11. <a class="fixed_nav_item_groups" onclick="location.href='{:U('Pingoods/pinlist',array('type' => 2))}'">
  12. <span class=" <?php if($type == 2){ ?>nav_cur<?php } ?>" >已成团</span>
  13. </a>
  14. <a class="fixed_nav_item_groups" onclick="location.href='{:U('Pingoods/pinlist',array('type' => 3))}'">
  15. <span class="<?php if($type == 3){ ?>nav_cur<?php } ?>" >拼团失败</span>
  16. </a>
  17. </div>
  18. <div class="mt_order" id="tuan_list">
  19. <volist name="list" id="d">
  20. <div class="groups">
  21. <div class="groups_line"></div>
  22. <div class="mt_g">
  23. <div class="mt_g_wrap">
  24. <div class="mt_g_img">
  25. <img src="{$d.image}">
  26. </div>
  27. <div class="mt_g_info">
  28. <p class="mt_g_name">{$d.name}</p>
  29. <p class="mt_g_price">
  30. <span class="mt_g_number">{$d.need_count}人团</span>
  31. <span>
  32. <b>¥</b><span>{$d.price}</span>
  33. </span>
  34. </p>
  35. <?php if($d['state'] == 0){ ?>
  36. <span class="mt_status_txt">拼团中</span>
  37. <?php }else if($d['state'] == 1){ ?>
  38. <span class="mt_status_txt">拼团成功 </span>
  39. <?php }else if($d['state'] == 2){ ?>
  40. <span class="mt_status_txt">拼团失败</span>
  41. <?php } ?>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="mt_status">
  46. <?php if($d['state'] == 0){ ?>
  47. <a href="{:U('Order/info', array('id' => $d['order_id']))}" class="mt_status_lk1">查看订单详情</a>
  48. <a href="{:U('Group/info', array('group_order_id' => $d['hash_order_id']))}" class="mt_status_lk1 marg_right on_going_group">邀请好友拼团</a>
  49. <?php }else if($d['state'] == 1){ ?>
  50. <a href="{:U('Order/info', array('id' => $d['order_id']))}" class="mt_status_lk1">查看订单详情</a>
  51. <a href="{:U('Group/info', array('group_order_id' => $d['hash_order_id']))}" class="mt_status_lk1 marg_right">查看团详情</a>
  52. <?php }else if($d['state'] == 2){ ?>
  53. <a href="{:U('Order/info', array('id' => $d['order_id']))}" class="mt_status_lk1">查看订单详情</a>
  54. <a href="{:U('Group/info', array('group_order_id' => $d['hash_order_id']))}" class="mt_status_lk1 marg_right">查看团详情</a>
  55. <?php } ?>
  56. </div>
  57. </div>
  58. </volist>
  59. </div>
  60. </div>
  61. <div class="center" id="center_pullup" style="display:none;">
  62. <span><img class="img_rotate" src="__PUBLIC__/pinduoduo/assets/img/pull_loading_8eba142.png"/>
  63. </span><span class="orders_text"></span>
  64. </div>
  65. <style>
  66. .bottom_tab {
  67. position: fixed;
  68. bottom: 0;
  69. left: 0;
  70. width: 100%;
  71. height: 0.51rem;
  72. border-top: 1px solid #f2f5f8;
  73. font-size: .09rem;
  74. display: -webkit-flex;
  75. -webkit-flex-flow: row nowrap;
  76. -webkit-align-items: center;
  77. -webkit-justify-content: space-between;
  78. display: flex;
  79. flex-flow: row nowrap;
  80. align-items: center;
  81. justify-content: space-between;
  82. }
  83. .bottom_tab, body {
  84. background-color: #fff;
  85. }
  86. .page_activity a {
  87. color: #666;
  88. text-decoration: none;
  89. }
  90. .bottom_tab .tab {
  91. text-align: center;
  92. -webkit-flex: 1;
  93. flex: 1;
  94. }
  95. .normal {
  96. background: url(__PUBLIC__/mogu/image/170821_7l5785llaikkj4e5al161lj49468e_72x72.png) no-repeat top center;
  97. }
  98. .cur .normal {
  99. background: url(__PUBLIC__/mogu/image/170821_2ifi3kcb9j91jae76fc6jh00hc4fl_72x72.png) no-repeat top center;
  100. }
  101. .bottom_tab .tab span {
  102. display: inline-block;
  103. padding-top: .27rem;
  104. }
  105. .newman {
  106. background: url(__PUBLIC__/mogu/image/170821_4caa2bah1797i0c1f1824hlih1g30_72x72.png) no-repeat top center;
  107. }
  108. .lottery {
  109. background: url(__PUBLIC__/mogu/image/170821_5951l6h436ig1l7010fj37e05iehg_72x72.png) no-repeat top center;
  110. }
  111. </style>
  112. <div class="bottom_tab" a="1">
  113. <a href="{:U('pingoods/index', array('type' => 'all'))}" data-url="all" class="tab change_type ">
  114. <span class="normal" style=" background-size: .25rem;">
  115. 拼团首页
  116. </span>
  117. </a>
  118. <a href="{:U('pingoods/index', array('type' => 'newman'))}" data-url="newman" class="tab change_type">
  119. <span class="newman" style=" background-size: .25rem;">
  120. 1分拼团
  121. </span>
  122. </a>
  123. <a href="{:U('pingoods/index', array('type' => 'lottery'))}" data-url="lottery" class="tab change_type ">
  124. <span class="lottery" style=" background-size: .25rem;">
  125. 抽奖团
  126. </span>
  127. </a>
  128. <a href="{:U('Pingoods/pinlist')}" class="tab cur">
  129. <span style="background: url(__PUBLIC__/mogu/image/170821_7a759fga0l98jjhjejigh94hj34ii_72x72.png) no-repeat top center; background-size: .25rem;">
  130. 我的拼团
  131. </span>
  132. </a>
  133. </div>
  134. <style>
  135. .center {
  136. width: 170px;
  137. margin: 0 auto;
  138. text-align: center;
  139. }
  140. .img_rotate {
  141. width: 30px;
  142. height: 30px;
  143. margin-top: 7px;
  144. margin-right: 5px;
  145. -webkit-animation: loading 1s linear 0s infinite;
  146. }
  147. @-webkit-keyframes loading {
  148. 0% {
  149. -webkit-transform: rotate(0);
  150. }
  151. 100% {
  152. -webkit-transform: rotate(360deg);
  153. }
  154. }
  155. .orders_text {
  156. line-height: 45px;
  157. font-weight: 700;
  158. font-size: 15px;
  159. }
  160. </style>
  161. <script>
  162. var offset = 0;
  163. var _pa = 2;
  164. var is_can_next = 1;
  165. var cur_url = "{:U('Group/pinlist',array('type' => $type))}";
  166. var req_step = 1;
  167. function loaddata()
  168. {
  169. var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); //浏览器的高度加上滚动条的高度
  170. if ($(document).height() <= totalheight+200) //当文档的高度小于或者等于总的高度的时候,开始动态加载数据
  171. {
  172. if(is_can_next == 1)//加载数据
  173. {
  174. is_can_next = 0;
  175. nextpage();
  176. }
  177. }
  178. }
  179. function nextpage()
  180. {
  181. $('#center_pullup').show();
  182. $.ajax(
  183. {
  184. url: cur_url,
  185. type:'post',
  186. data:{page:_pa},
  187. dataType: 'json',
  188. success: function(result){
  189. if(result.code == 1)
  190. {
  191. $('#tuan_list').append(result.html);
  192. $('#center_pullup').hide();
  193. _pa++;
  194. is_can_next = 1;
  195. } else if(result.code == 0) {
  196. $('#center_pullup').remove();
  197. }
  198. }
  199. }
  200. );
  201. }
  202. $(function(){
  203. $(window).scroll( function() {
  204. loaddata();
  205. });
  206. })
  207. </script>
  208. </block>