index.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {extend name="default/base/base_member" /}
  2. {block name="member_btn"}
  3. <a class="dsm-btn dsm-btn-red" href="javascript:void(0);" ds_type="delbtn" data-param='{"goods_id":"all"}'><i class="iconfont">&#xe725;</i>{$Think.lang.clear_all_footprints}</a>
  4. {/block}
  5. {block name="member_main"}
  6. <div class="dsm-browse">
  7. <div class="dsm-browse-left">
  8. {notempty name="browselist"}
  9. <ul class="dsm-browse-list">
  10. {foreach name="browselist" item="v"}
  11. <li id="browserow_{$v.goods_id}">
  12. <div class="browse-timeline">&nbsp;</div>
  13. <div class="browse-time">{$v.browsetime_text}</div>
  14. <div class="browse-goods">
  15. <div class="goods-thumb"><a href="{:url('Goods/index',['goods_id'=>$v.goods_id])}" target="_blank"><img src="{:goods_cthumb($v.goods_image,240)}" /></a> </div>
  16. <dl class="goods-info">
  17. <dt><a target="_blank" href="{:url('Goods/index',['goods_id'=>$v.goods_id])}">{$v.goods_name}</a></dt>
  18. <dd>{$Think.lang.mall_price}:
  19. <em class="sale-price">{$Think.lang.currency}{$v.goods_promotion_price}</em>
  20. {if $v.goods_marketprice>0}<em class="market-price" title="{$Think.lang.market_price}">{$Think.lang.currency}{$v.goods_marketprice}</em>{/if}
  21. </dd>
  22. </dl>
  23. <a class="dsm-btn dsm-btn-orange" href="javascript:addcart({$v.goods_id},1,'','o');"><i class="iconfont">&#xe69a;</i>{$Think.lang.add_cart}</a>
  24. <br/><br/>
  25. <a class="dsm-btn" href="javascript:void(0);" ds_type="delbtn" data-param='{"goods_id":{$v.goods_id}}'><i class="iconfont">&#xe725;</i>{$Think.lang.delete_record}</a>
  26. </div>
  27. </li>
  28. {/foreach}
  29. </ul>
  30. {else /}
  31. <div class="norecord">
  32. <div class="warning-option"><i></i><span>{$Think.lang.no_record}</span></div>
  33. </div>
  34. {/notempty}
  35. </div>
  36. <div class="dsm-browse-class" style="display: none">
  37. <div class="title"><a href="{:url('Membergoodsbrowse/listinfo')}" class="{$Request.param.gc_id ?'':'selected'}"> {$Think.lang.ds_full_history}</a></div>
  38. <ul id="sidebarMenu">
  39. {foreach name="browseclass_arr" item="v"}
  40. <li class="side-menu"> <a href="{:url('Membergoodsbrowse/listinfo',['gc_id'=>$key])}" class="{if $Request.param.gc_id == $key}selected{/if}"><i></i>{$v.gc_name}</a>
  41. <ul style="<?php echo input('param.gc_id') == $k || in_array(input('param.gc_id'),array_keys($v['sonclass']))?'display: block;':'display: none;'; ?>">
  42. {foreach name="v.sonclass" item="v_son" key="k_son"}
  43. <li class="{if $Request.param.gc_id == $k_son}selected{/if}"><a href="{:url('Membergoodsbrowse/listinfo',['gc_id'=>$k_son])}">{$v_son.gc_name}</a></li>
  44. {/foreach}
  45. </ul>
  46. </li>
  47. {/foreach}
  48. </ul>
  49. </div>
  50. </div>
  51. <form id="buynow_form" method="post" action="{:url('Buy/buy_step1')}" target="_blank">
  52. <input id="goods_id" name="cart_id[]" type="hidden"/>
  53. </form>
  54. <script>
  55. jQuery.browser={};(function(){jQuery.browser.msie=false; jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)./)){ jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})();
  56. </script>
  57. <script src="{$Think.PLUGINS_SITE_ROOT}/jquery.poshytip.min.js"></script>
  58. <script type="text/javascript">
  59. $(document).ready(function(){
  60. //清除单条浏览记录
  61. $("[ds_type='delbtn']").on('click',function(){
  62. var _this=$(this);
  63. layer.confirm("{$Think.lang.ds_ensure_del}", {
  64. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  65. title: false,
  66. }, function () {
  67. var data_str = _this.attr('data-param');
  68. eval( "data_str = "+data_str);
  69. $.getJSON(HOMESITEURL+'/Membergoodsbrowse/del.html?goods_id='+data_str.goods_id,function(data){
  70. if(data.done == true){
  71. if(data_str.goods_id == 'all'){
  72. location.reload(true);
  73. } else {
  74. $("#browserow_"+data_str.goods_id).hide();
  75. layer.msg("{$Think.lang.ds_common_del_succ}");
  76. }
  77. }else{
  78. layer.alert(data.msg);
  79. }
  80. });
  81. });
  82. });
  83. //立即购买
  84. $('a[dstype="buy_now"]').click(function(){
  85. eval('var data_str = ' + $(this).attr('data-param'));
  86. $("#goods_id").val(data_str.goods_id+'|1');
  87. $("#buynow_form").submit();
  88. });
  89. });
  90. </script>
  91. {/block}