myfavshop.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <extend name="Public:mogubase" />
  2. <block name="content">
  3. <script src="__PUBLIC__/js/jquery/jquery-2.0.3.min.js"></script>
  4. <script type="text/javascript"> window.use_screen_base = '640'; (function(a,b){var c="orientationchange"in b?"orientationchange":"resize",d=use_screen_base.indexOf("_mate"),e=parseInt(use_screen_base),f=a.documentElement,g=function(){var a=f.clientWidth,c=b.innerWidth;f.style.fontSize=100*(c/e)+"px"};if(/iPad.*OS|iPhone.*OS/.test(navigator.userAgent)&&d>0){var h=a.querySelectorAll("meta[name=viewport]"),i=b.devicePixelRatio;i=i!=1?2:1,h[0]&&h[0].setAttribute("content","width=device-width, user-scalable=no, minimum-scale="+1/i+", maximum-scale="+1/i+", initial-scale="+1/i)}g(),b.addEventListener(c,g,!1),delete use_screen_base})(document,window); </script>
  5. <link rel="stylesheet" type="text/css" href="__PUBLIC__/mogu/base-22357a5508.css" />
  6. <link rel="stylesheet" href="__PUBLIC__/mogu/myShop-6383ca9488.css" />
  7. <header class="page_head">
  8. <div class="back_icon" id="back_btn" onclick="location.href='{:U('User/index')}';">
  9. <img src="http://s17.mogucdn.com/p1/160922/idid_ie3wmnbvgftginzsmizdambqgayde_35x52.png" />
  10. </div>
  11. <a class="right_btn" href="{:U('Cart/show_cart_goods')}">购物车</a>
  12. <div class="title">
  13. <a href="{:U('Index/index')}">收藏的店铺</a>
  14. </div>
  15. </header>
  16. <div class="my_shop waterfall-container" id="tuan_list">
  17. <?php foreach($list as $vv){ $store = $vv['tp_store']; ?>
  18. <section class="shop_list waterfall-frame-0 waterfall-box waterfall-optimise-show" style="">
  19. <a href="<?php echo U('Seller/info', array('seller_id' => $store['s_id'])); ?>"> <em> </em>
  20. <dl class="shop_name">
  21. <dt>
  22. <img src="<?php echo $store['logo']; ?>" />
  23. </dt>
  24. <dd>
  25. <?php echo $store['s_true_name']; ?>
  26. </dd>
  27. </dl>
  28. </a>
  29. <div class="tags_inner tags_scroll">
  30. <?php foreach($vv['goods'] as $val ){ ?>
  31. <a href="<?php echo U('/goods/'.$val['goods_id']); ?>">
  32. <span class="bs_load_img lazyTransition" style="background-size: cover; background-image: url('<?php echo resize($val['image'], 400, 400); ?>'); opacity: 1;"></span>
  33. </a>
  34. <?php } ?>
  35. </div>
  36. </section>
  37. <?php } ?>
  38. </div>
  39. <div class="pullUp" status="stop" style="display:none;"></div>
  40. <div class="center" id="center_pullup" style="display:none;">
  41. <span><img class="img_rotate" src="__PUBLIC__/pinduoduo/assets/img/pull_loading_8eba142.png"/>
  42. </span><span class="orders_text"></span>
  43. </div>
  44. <div style="height:50px;"></div>
  45. <style>
  46. .container{background-color:#fff;}
  47. .coupon-tabbar .coupon-tab {
  48. width:49%;
  49. }
  50. .center {
  51. width: 170px;
  52. margin: 0 auto;
  53. text-align: center;
  54. }
  55. .img_rotate {
  56. width: 30px;
  57. height: 30px;
  58. margin-top: 7px;
  59. margin-right: 5px;
  60. -webkit-animation: loading 1s linear 0s infinite;
  61. }
  62. @-webkit-keyframes loading {
  63. 0% {
  64. -webkit-transform: rotate(0);
  65. }
  66. 100% {
  67. -webkit-transform: rotate(360deg);
  68. }
  69. }
  70. .orders_text {
  71. line-height: 45px;
  72. font-weight: 700;
  73. font-size: 15px;
  74. }
  75. </style>
  76. <script>
  77. var offset = 0;
  78. var _pa = 2;
  79. var is_can_next = 1;
  80. var cur_url = "{:U('User/myfavshop')}";
  81. var req_step = 1;
  82. function del_fav(obj,goods_id)
  83. {
  84. $.ajax({
  85. url:"index.php?s=/Goods/fav_toggle",
  86. type:'post',
  87. data:{goods_id:goods_id},
  88. dataType:'json',
  89. success:function(ret){
  90. $(obj).parent().parent().parent().remove();
  91. }
  92. })
  93. return false;
  94. }
  95. function loaddata()
  96. {
  97. var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); //浏览器的高度加上滚动条的高度
  98. if ($(document).height() <= totalheight+200) //当文档的高度小于或者等于总的高度的时候,开始动态加载数据
  99. {
  100. if(is_can_next == 1)//加载数据
  101. {
  102. is_can_next = 0;
  103. nextpage();
  104. }
  105. }
  106. }
  107. function nextpage()
  108. {
  109. $('#center_pullup').show();
  110. $.ajax(
  111. {
  112. url: cur_url,
  113. type:'post',
  114. data:{page:_pa},
  115. dataType: 'json',
  116. success: function(result){
  117. if(result.code == 1)
  118. {
  119. $('#tuan_list').append(result.html);
  120. $('#center_pullup').hide();
  121. _pa++;
  122. is_can_next = 1;
  123. } else if(result.code == 0) {
  124. $('#center_pullup').remove();
  125. }
  126. }
  127. }
  128. );
  129. }
  130. $(function(){
  131. $(window).scroll( function() {
  132. loaddata();
  133. });
  134. })
  135. </script>
  136. </block>