index.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <extend name="Public:mogubase" />
  2. <block name="content">
  3. <script src="__PUBLIC__/js/jquery/jquery-2.0.3.min.js"></script>
  4. <link rel="stylesheet" type="text/css" href="__PUBLIC__/mogu/index.css" media="all" />
  5. <link rel="stylesheet" href="__PUBLIC__/mogu/base-22357a5508.css">
  6. <link rel="stylesheet" href="__PUBLIC__/mogu/shop-73c3bb1a99.css">
  7. <script type="text/javascript"> window.use_screen_base = '640_mate'; (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>
  8. <header class="page_head">
  9. <div class="back_icon" id="back_btn">
  10. <i></i>
  11. </div>
  12. <div class="right_btn js_shop_cate" style="display:none;">
  13. <i></i>分类
  14. </div>
  15. <a class="title">{$seller_info.s_true_name}</a>
  16. <div class="cate_wrap none_f">
  17. <div class="cate_inner">
  18. <?php foreach($category_list as $cate_val){ ?>
  19. <a href="javascript:;" data-gid="<?php echo $cate_val['id']; ?>"><?php echo $cate_val['name']; ?></a>
  20. <?php } ?>
  21. </div>
  22. </div>
  23. </header>
  24. <section>
  25. <div class="shop_head">
  26. <a class="shop_info" href="javascript:void(0)">
  27. <div class="shop_logo" style="background-image: url(<?php echo resize($seller_info['s_logo'], 200, 200); ?>);"></div>
  28. <h3 class="shop_nick">{$seller_info.s_true_name}</h3>
  29. </a>
  30. </div>
  31. <div class="shop_main">
  32. <div class="nums">
  33. 商品:
  34. <span>{$goods_count}</span>粉丝:
  35. <span>{$fans_count}</span>
  36. </div>
  37. <!-- <p class="shop_desc">YIGELILA,懂女人,更懂连衣裙</p> -->
  38. <div class="follow">
  39. <?php if($is_fav_seller){ ?>
  40. <div class="operate_btn follow_btn js_follow_btn" data-follow="1">
  41. <i></i>已收藏
  42. </div>
  43. <?php }else { ?>
  44. <div class="operate_btn follow_btn js_follow_btn" data-follow="0">
  45. <i></i>收藏店铺
  46. </div>
  47. <?php } ?>
  48. <?php
  49. if($open_web_kefu == 1){
  50. ?>
  51. <a href="{:U('Seller/kefu_seller', array('store_id' => $seller_info['s_id']))}" class="operate_btn customer_service js_customer_service"><i></i>联系客服</a>
  52. <?php }else{ ?>
  53. <a href="http://wpa.qq.com/msgrd?v=3&uin={$seller_info.s_qq}&site=qq&menu=yes" class="operate_btn customer_service js_customer_service"><i></i>联系客服</a>
  54. <?php } ?>
  55. </div>
  56. </div>
  57. <div class="shop_coupon">
  58. </div>
  59. <div class="space_bg"></div>
  60. <nav class="js_poster_nav">
  61. <ul>
  62. <li class="order current" id="sort_hint_0"><strong>默认</strong></li>
  63. <li class="order" id="sort_hint_2"><strong>最新</strong></li>
  64. <li class="order" id="sort_hint_1"><strong>销量</strong></li>
  65. <li class="order on_price" id="sort_hint_3"><strong>价格
  66. <span id="price_order" style="display:none;"></span></strong></li>
  67. </ul>
  68. </nav>
  69. <div class="goods_wrap">
  70. <div id="goods_wall">
  71. <div class="poster_wrap waterfall-container" id="tuan_list">
  72. <volist name="list" id="d">
  73. <div class="poster_grid poster_wall waterfall-frame-1 waterfall-box waterfall-optimise-show" >
  74. <figure>
  75. <div class="pic_load">
  76. <a class="bs_load_img lazyTransition" style="opacity: 1; " href="{:U('/goods/'.$d['goods_id'])}" >
  77. <img src="{$d.image}" width="100%" />
  78. </a>
  79. </div>
  80. <p class="clothesTitle">{$d.name}</p>
  81. <figcaption>
  82. <span class="price">¥{$d.danprice}</span>
  83. <span class="like icon-heart">{$d.seller_count}</span>
  84. </figcaption>
  85. </figure>
  86. </div>
  87. </volist>
  88. </div>
  89. </div>
  90. <div class="pullUp" id="center_pullup" status="loading">
  91. <div></div>
  92. <div></div>
  93. <div></div>
  94. <div></div>
  95. <div></div>
  96. <div></div>
  97. <div></div>
  98. <div></div>
  99. </div>
  100. </div>
  101. </section>
  102. <script>
  103. var offset = 0;
  104. var _pa = 2;
  105. var is_can_next = 1;
  106. var gid = 0;
  107. var seller_id = {$seller_id};
  108. var cur_url = "{:U('Seller/info')}";
  109. var order_by = 'default';
  110. function loaddata()
  111. {
  112. var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); //浏览器的高度加上滚动条的高度
  113. if ($(document).height() <= totalheight+200) //当文档的高度小于或者等于总的高度的时候,开始动态加载数据
  114. {
  115. if(is_can_next == 1)//加载数据
  116. {
  117. is_can_next = 0;
  118. nextpage();
  119. }
  120. }
  121. }
  122. function nextpage()
  123. {
  124. var best_url = cur_url+'&page='+_pa;
  125. $('#center_pullup').show();
  126. $.ajax(
  127. {
  128. url: cur_url,
  129. type:'post',
  130. data:{page:_pa,seller_id:seller_id,is_ajax:1,order_by:order_by,gid:gid},
  131. dataType: 'json',
  132. success: function(result){
  133. if(result.code == 1)
  134. {
  135. $('#tuan_list').append(result.html);
  136. $('#center_pullup').hide();
  137. _pa++;
  138. is_can_next = 1;
  139. //bindImgEvent(); //暂时屏蔽
  140. } else if(result.code == 0) {
  141. $('#center_pullup').remove();
  142. }
  143. }
  144. }
  145. );
  146. }
  147. $(function(){
  148. $('.coupon-take').click(function(){
  149. var quan_id = $(this).attr('data-id');
  150. $.ajax({
  151. url:"{:U('Seller/getQuan')}",
  152. type:'post',
  153. data:{quan_id:quan_id},
  154. dataType:'json',
  155. success:function(result){
  156. showTip(result.msg);
  157. }
  158. })
  159. })
  160. $('#back_btn').click(function(){
  161. location.href = "{:U('Index/index')}";
  162. return false;
  163. })
  164. $('.js_follow_btn').click(function(){
  165. //seller_id
  166. var obj = $(this);
  167. $.ajax({
  168. url:"{:U('user/fav_storetoggle')}",
  169. type:'get',
  170. data:{store_id:seller_id},
  171. dataType:'json',
  172. success:function(ret){
  173. if(ret.code == 1)
  174. {
  175. $(obj).attr('data-follow',0);
  176. $(obj).html('<i></i>收藏店铺');
  177. }else{
  178. $(obj).attr('data-follow',1);
  179. $(obj).html('<i></i>已店铺');
  180. }
  181. }
  182. })
  183. })
  184. $(window).scroll( function() {
  185. loaddata();
  186. });
  187. $('.cate_inner a').click(function(){
  188. //gid
  189. gid = $(this).attr('data-gid');
  190. $('.cate_wrap').addClass('none_f');
  191. _pa = 1;
  192. $('#tuan_list').html('');
  193. nextpage();
  194. })
  195. $('#goods_sort').click(function(){
  196. if( $('.nav_item_order_bd_arrow').hasClass('arrow_rotate_m_90') ){
  197. $('.sort_container').addClass('not_show_hint');
  198. $('.nav_item_order_bd_arrow').removeClass('arrow_rotate_m_90');
  199. } else {
  200. $('.sort_container').removeClass('not_show_hint');
  201. $('.nav_item_order_bd_arrow').addClass('arrow_rotate_m_90');
  202. }
  203. })
  204. $('#sort_hint_0').click(function(){
  205. $(this).addClass('current').siblings().removeClass('current');
  206. //$('.sort_hints').removeClass('color_def');
  207. //$('.sort_hints').removeClass('color_hot');
  208. //$('.sort_hints').removeClass('color_new');
  209. //$('.sort_hints').addClass('color_def');
  210. order_by = 'default';
  211. _pa = 1;
  212. $('.sort_container').addClass('not_show_hint');
  213. $('.nav_item_order_bd_arrow').removeClass('arrow_rotate_m_90');
  214. $('#goods_sort').html( $(this).html());
  215. $('#tuan_list').html('');
  216. nextpage();
  217. })
  218. $('#sort_hint_1').click(function(){
  219. $(this).addClass('current').siblings().removeClass('current');
  220. //$('.sort_hints').removeClass('color_def');
  221. //$('.sort_hints').removeClass('color_hot');
  222. //$('.sort_hints').removeClass('color_new');
  223. //$('.sort_hints').addClass('color_hot');
  224. order_by = 'hot';
  225. _pa = 1;
  226. $('.sort_container').addClass('not_show_hint');
  227. $('.nav_item_order_bd_arrow').removeClass('arrow_rotate_m_90');
  228. $('#goods_sort').html( $(this).html());
  229. $('#tuan_list').html('');
  230. nextpage();
  231. })
  232. $('#sort_hint_2').click(function(){
  233. $(this).addClass('current').siblings().removeClass('current');
  234. //$('.sort_hints').removeClass('color_def');
  235. //$('.sort_hints').removeClass('color_hot');
  236. //$('.sort_hints').removeClass('color_new');
  237. //$('.sort_hints').addClass('color_new');
  238. order_by = 'new';
  239. _pa = 1;
  240. $('.sort_container').addClass('not_show_hint');
  241. $('.nav_item_order_bd_arrow').removeClass('arrow_rotate_m_90');
  242. $('#goods_sort').html( $(this).html());
  243. $('#tuan_list').html('');
  244. nextpage();
  245. })
  246. $('#sort_hint_3').click(function(){
  247. $(this).addClass('current').siblings().removeClass('current');
  248. //$('.sort_hints').removeClass('color_def');
  249. //$('.sort_hints').removeClass('color_hot');
  250. //$('.sort_hints').removeClass('color_new');
  251. //$('.sort_hints').addClass('color_hot');
  252. order_by = 'price';
  253. _pa = 1;
  254. $('.sort_container').addClass('not_show_hint');
  255. $('.nav_item_order_bd_arrow').removeClass('arrow_rotate_m_90');
  256. $('#goods_sort').html( $(this).html());
  257. $('#tuan_list').html('');
  258. nextpage();
  259. })
  260. })
  261. </script>
  262. <script>
  263. $(function(){
  264. $('.js_shop_cate').click(function(){
  265. if( $('.cate_wrap').hasClass('none_f') ){
  266. $('.cate_wrap').removeClass('none_f');
  267. }else {
  268. $('.cate_wrap').addClass('none_f');
  269. }
  270. })
  271. })
  272. </script>
  273. </block>