index.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <extend name="Public:pinduoduobase" />
  2. <block name="content">
  3. <link rel="stylesheet" href="__PUBLIC__/pinduoduo/assets/css/boot_9ceec27523e20f8313e0b5fcc99513f5.css">
  4. <link rel="stylesheet" href="__PUBLIC__/pinduoduo/assets/css/classification_v2_a150d26f80103c876c3c77cc650e9414.css">
  5. <script type="text/javascript" src="__PUBLIC__/pinduoduo/js/iscroll.js"></script>
  6. <section id="classification-container" class="container" avalonctrl="categories">
  7. <div id="search-bar">
  8. <div style="margin-bottom: 0;" class="search-box-class">
  9. <div class="search-box-main">
  10. <div class="search-icon-container">
  11. <div class="search-icon-class"></div>
  12. </div>
  13. <div class="search-box-container">
  14. <div class="search-box">输入您想要查找的商品名称</div>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <div id="root-list" class="turn-background-grey">
  20. <ul>
  21. <?php $i = 0; foreach($parent_list as $cate) { ?>
  22. <li class="root-list-item <?php if($i==0){ ?>root-active<?php } ?>">
  23. <div class="root-box">
  24. <span><?php echo $cate['name']; ?></span>
  25. <img src="__UPLOAD__/<?php echo $cate['logo']; ?>" style="display:none;">
  26. </div>
  27. </li>
  28. <?php $i ++; } ?>
  29. </ul>
  30. </div>
  31. <div id="detail-list" >
  32. <ul>
  33. <?php foreach($parent_list as $cate) { ?>
  34. <li class="classification-detail-item">
  35. <div class="head" onclick="location.href='<?php echo U('Category/info', array('gid' => $cate['id'])); ?>'">
  36. <div class="tab">
  37. <span><?php echo $cate['name']; ?></span>
  38. </div>
  39. <div class="show-all" style="display:none;">
  40. 查看更多
  41. <img class="detail-arrow" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAQBAMAAADdUfNzAAAAIVBMVEUAAACcnJycnJycnJycnJycnJycnJycnJycnJycnJycnJx3mU74AAAAC3RSTlMAfw5vJHdYSjUbQQwBkC0AAAAySURBVAjXY+AoYgCCicIKQFJV0AhIsgiCOY6onAQgySUYAGFDxMFqIEywXpg5IDNhAAB0CwdERcuYjQAAAABJRU5ErkJggg==">
  42. </div>
  43. </div>
  44. <ul class="detail">
  45. <?php foreach($cate['child_list'] as $childcate){ ?>
  46. <li class="detail-item" onclick="location.href='<?php echo U('Category/info', array('gid' => $childcate['id'])); ?>'">
  47. <img src="__UPLOAD__/<?php echo $childcate['logo']; ?>" />
  48. <p>{$childcate.name}</p>
  49. </li>
  50. <?php } ?>
  51. </ul>
  52. </li>
  53. <?php } ?>
  54. </ul>
  55. </div>
  56. </section>
  57. <div class="search-view-container" avalonctrl="search" style="display:none;">
  58. <div class="search-view-top">
  59. <form action="{:U('Category/index')}" method="post" id="search-module-submit">
  60. <input type="search" name="keyword" style="-webkit-appearance: none; width: 265px;" class="search-box-view-main" placeholder="请输入您要搜索的商品名称">
  61. </form>
  62. <div class="search-view-icon"></div>
  63. <div class="search-content-clear"></div>
  64. <div class="cancel-container-view">
  65. <div class="cancel-button-view">取消</div>
  66. </div>
  67. </div>
  68. <!--ms-if-->
  69. </div>
  70. <include file="Widget:pin_notify" />
  71. <include file="Public:foot_pinduoduo" />
  72. <style>
  73. #ws-for-push{
  74. display:none;
  75. }
  76. .center {
  77. width: 170px;
  78. margin: 0 auto;
  79. text-align: center;
  80. }
  81. .img_rotate {
  82. width: 30px;
  83. height: 30px;
  84. margin-top: 7px;
  85. margin-right: 5px;
  86. -webkit-animation: loading 1s linear 0s infinite;
  87. }
  88. @-webkit-keyframes loading {
  89. 0% {
  90. -webkit-transform: rotate(0);
  91. }
  92. 100% {
  93. -webkit-transform: rotate(360deg);
  94. }
  95. }
  96. .orders_text {
  97. line-height: 45px;
  98. font-weight: 700;
  99. font-size: 15px;
  100. }
  101. </style>
  102. <script type="text/javascript">
  103. var myScroll;
  104. var myScroll2;
  105. function loaded () {
  106. }
  107. document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
  108. $(function(){
  109. var win_height = $(window).height();
  110. var need_height = win_height - 100;
  111. $('#detail-list').css('height',need_height+'px');
  112. $('#root-list').css('height',need_height+'px');
  113. myScroll = new IScroll('#detail-list', { snap: '.classification-detail-item',mouseWheel: true, click: true });
  114. myScroll2 = new IScroll('#root-list', { snap: true,mouseWheel: true, click: true });
  115. $('#root-list li').click(function(){
  116. var s_index = $(this).index();
  117. $(this).addClass('root-active').siblings().removeClass('root-active');
  118. myScroll.goToPage(0, s_index, 1000);
  119. });
  120. })
  121. </script>
  122. <script>
  123. $(function(){
  124. $('.search-box-class').click(function(){
  125. $('.search-view-container').show();
  126. })
  127. $('.cancel-container-view').click(function(){
  128. $('.search-view-container').hide();
  129. })
  130. $('.search-content-clear').click(function(){
  131. $('.search-box-view-main').val('');
  132. })
  133. })
  134. </script>
  135. </block>