index.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {extend name="default/base/base_home" /}
  2. {block name="mall_main"}
  3. <style type="text/css">
  4. #box { background: #FFF; width: 238px; height: 410px; margin: -390px 0 0 0; display: block; border: solid 4px #D93600; position: absolute; z-index: 999; opacity: .5 }
  5. #infscr-loading { display: none; }
  6. </style>
  7. <script src="{$Think.HOME_SITE_ROOT}/js/search_goods.js"></script>
  8. <div class="dsh-container wrapper">
  9. <div class="dsp-category">
  10. <ul>
  11. <input type="hidden" id="storeclass_id" value="{$Request.param.gc_id}"/>
  12. <li><a class="" href="{:url('Promotion/index')}">{$Think.lang.ds_all_goods_class}</a></li>
  13. {foreach name="goods_class" item="v" key="k" }
  14. <li><a class="{if condition="$Request.param.gc_id eq $v.gc_id"}selected{/if}" href="{:url('Promotion/index',['gc_id'=>$v.gc_id])}"}'>{$v.gc_name}</a></li>
  15. {/foreach}
  16. </ul>
  17. </div>
  18. {notempty name="goods_list"}
  19. <div id="promotionGoods">
  20. {foreach name="goods_list" item="goods_info"}
  21. <div class="item">
  22. <div class="scope">
  23. <dl class="goods">
  24. <dt class="goods-thumb"> <a title="{$goods_info.goods_name}" target="_blank" href="{$goods_info.goods_url}"><img src="{$goods_info.image_url_240}" /></a> </dt>
  25. <dd class="goods-name"><span><strong>{$goods_info.xianshi_title}</strong></span> <a target="_blank" href="{$goods_info.goods_url}">{$goods_info.goods_name}</a></dd>
  26. </dl>
  27. <div class="goods-price"><span class="sale">{$Think.lang.sale_price}<em>{:ds_price_format_forlist($goods_info['xianshigoods_price'])}</em>{$Think.lang.ds_yuan}</span><span class="depreciate"><i class="iconfont">&#xe689;</i>{$Think.lang.direct_fall}:¥{$goods_info.down_price}</span></div>
  28. {if (session('is_login') === '1')}
  29. <div class="goods-buy"><a href="javascript:void(0);" dstype="add_cart" data-param="{goods_id:{$goods_info.goods_id}}" class="btn">{$Think.lang.immediate_rush}</a> <span class="raty" data-score="{$goods_info.evaluation_good_star}" style="width: 100px;"></span> <span class="mt5"><a href="{:url('Store/index',['store_id'=>$goods_info.store_id])}">{$goods_info.store_name}</a></span> </div>
  30. {/if}
  31. <ul class="goodseval">
  32. {notempty name="$goodsevallist[$goods_info['goods_id']]"}
  33. {foreach name="$goodsevallist[$goods_info['goods_id']]" item="v" key="k" }
  34. <li>
  35. <div class="user-avatar"> <img src="{:get_member_avatar_for_id($v['geval_frommemberid'])}"> </div>
  36. <div class="eval"><i class="iconfont">&#xe752;</i>{$v.geval_content}<i class="iconfont">&#xe751;</i></div>
  37. </li>
  38. {/foreach}
  39. {/notempty}
  40. </ul>
  41. </div>
  42. </div>
  43. {/foreach}
  44. </div>
  45. {else /}
  46. <div class="no_results">{$Think.lang.index_no_record}</div>
  47. {/notempty}
  48. </div>
  49. <script src="{$Think.PLUGINS_SITE_ROOT}/jquery.masonry.js"></script>
  50. <script src="{$Think.PLUGINS_SITE_ROOT}/jquery.infinitescroll.js"></script>
  51. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.raty/jquery.raty.min.js"></script>
  52. <script>
  53. var $container = $('#promotionGoods');
  54. $container.masonry({
  55. columnWidth: 305,
  56. itemSelector: '.item'
  57. });
  58. $(function(){
  59. $container.infinitescroll({
  60. navSelector : '#page-more',
  61. nextSelector : '#page-more a',
  62. itemSelector : '.item',
  63. loading: {
  64. selector:'#page-nav',
  65. img: '{$Think.HOME_SITE_ROOT}/images/loading.gif',
  66. msgText:{$Think.lang.promotion_prompt_words1},
  67. maxPage : '{$total_page}',
  68. finishedMsg : {$Think.lang.promotion_prompt_words2},
  69. finished : function() {
  70. $('.raty').raty({
  71. path: "{$Think.PLUGINS_SITE_ROOT}/js/jquery.raty/img",
  72. readOnly: true,
  73. width: 100,
  74. score: function() {
  75. return $(this).attr('data-score');
  76. }
  77. });
  78. }
  79. }
  80. },function(newElements){
  81. var $newElems = $(newElements);
  82. $container.masonry('appended', $newElems, true);
  83. });
  84. $('.raty').raty({
  85. path: "{$Think.PLUGINS_SITE_ROOT}/js/jquery.raty/img",
  86. readOnly: true,
  87. width: 100,
  88. score: function() {
  89. return $(this).attr('data-score');
  90. }
  91. });
  92. });
  93. </script>
  94. {/block}