pointmallvoucher.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {extend name="default/base/base_home" /}
  2. {block name="mall_main"}
  3. <link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/point.css">
  4. {include file="default/member/pointprod/pointshop_minfo" /}
  5. <div class="exchange-cate">
  6. <div class="w w1200">
  7. <input type="hidden" id="gc_id" value="{$Request.param.gc_id}"/>
  8. <a class="{if $Request.param.gc_id<=0}curr{/if}" href="javascript:void(0);" ds_type="search_cate" data-param='{"gc_id":""}'>{$Think.lang.ds_all}</a><i class="point">·</i>
  9. {foreach name="gc_list" item="v"}
  10. <a class="{if $Request.param.gc_id == $v.gc_id}curr{/if}" href="javascript:void(0);" ds_type="search_cate" data-param='{"gc_id":"{$v.gc_id}"}'>{$v.gc_name}</a><i class="point">·</i>
  11. {/foreach}
  12. </div>
  13. </div>
  14. <div class="dsp-container">
  15. <div class="dsp-main-layout">
  16. <div class="dsp-category">
  17. <!-- 高级搜索start -->
  18. <dl class="searchbox">
  19. <dd>
  20. <ul>
  21. <li>{$Think.lang.ds_sort}:</li>
  22. <input type="hidden" id="orderby" name="orderby" value="{$Request.param.orderby ? $Request.param.orderby:'default'}"/>
  23. <!-- 默认排序s -->
  24. {if $Request.param.orderby=='default' ||!$Request.param.orderby}
  25. <li class="selected">{$Think.lang.default_sort}</li>
  26. {else /}
  27. <li ds_type="search_orderby" data-param='{"orderval":"default"}'>{$Think.lang.default_sort}</li>
  28. {/if}
  29. <!-- 默认排序e -->
  30. <!-- 积分值s -->
  31. {if $Request.param.orderby=='pointsdesc'}
  32. <li class="selected" ds_type="search_orderby" data-param='{"orderval":"pointsasc"}'>{$Think.lang.points}<em class="desc"></em></li>
  33. {elseif $Request.param.orderby=='pointsasc'}
  34. <li class="selected" ds_type="search_orderby" data-param='{"orderval":"pointsdesc"}'>{$Think.lang.points}<em class="asc"></em></li>
  35. {else /}
  36. <li ds_type="search_orderby" data-param='{"orderval":"pointsdesc"}'>{$Think.lang.points}<em></em></li>
  37. {/if}
  38. <!-- 积分值e -->
  39. <li>&nbsp;</li>
  40. <!-- 面额s -->
  41. <li>{$Think.lang.coupon_values}:
  42. <select id="price" onchange="javascript:searchvoucher();">
  43. <option value='' selected >{$Think.lang.ds_please_choose}</option>
  44. {notempty name="mallvoucherlist"}
  45. {foreach name="mallvoucherlist" item="v"}
  46. <option value="{$v.mallvouchertemplate_price}" {$Request.param.price == $v.mallvouchertemplate_price ?'selected':''}>{$v.mallvouchertemplate_price}{$Think.lang.ds_yuan}{$Think.lang.home_voucher}</option>
  47. {/foreach}
  48. {/notempty}
  49. </select>
  50. </li>
  51. <!-- 面额e -->
  52. <li>&nbsp;</li>
  53. <!-- 所需积分s -->
  54. <li>{$Think.lang.home_voucher_points}:
  55. <input type="text" id="points_min" class="text w50" value="{$Request.param.points_min}"/>
  56. ~
  57. <input type="text" id="points_max" class="text w50" value="{$Request.param.points_max}" />
  58. <a href="javascript:searchvoucher();" class="dsp-btn">{$Think.lang.ds_search}</a> </li>
  59. <!-- 所需积分e -->
  60. {if session('is_login')=='1'}
  61. <li>
  62. <label for="isable"><input type="checkbox" id="isable" {$Request.param.isable ==1?'checked="checked"':''} onclick="javascript:searchvoucher();">
  63. &nbsp;{$Think.lang.watch_exchange_them} </label></li>
  64. {/if}
  65. </ul>
  66. </dd>
  67. </dl>
  68. <!-- 高级搜索end --></div>
  69. {notempty name="mallvoucherlist"}
  70. <ul class="dsp-voucher-list">
  71. {foreach name="mallvoucherlist" item="v"}
  72. <li>
  73. <div class="coupon_item">
  74. <div class="coupon_lk">
  75. <a href="javascript:void(0);" ds_type="exchangebtn" data-param='{"vid":"{$v.mallvouchertemplate_id}"}'>
  76. <div class="coupon_more">
  77. <div class="coupon_more_inner">{$Think.lang.immediately_change}</div>
  78. </div>
  79. </a>
  80. <div class="coupon_info mallvoucher">
  81. <div class="info">
  82. <div class="mod_price coupon_price"><i>¥</i><span>{$v.mallvouchertemplate_price}</span></div>
  83. <div class="coupon_limit" title="{$Think.lang.home_voucher_desc_1}{$v.mallvouchertemplate_limit}{$Think.lang.yuan_available}">{$Think.lang.home_voucher_desc_1}{$v.mallvouchertemplate_limit}{$Think.lang.yuan_available}</div>
  84. <div class="coupon_desc" title="{$Think.lang.required}{$v.mallvouchertemplate_points}{$Think.lang.points_unit}">{$Think.lang.required}<em>{$v.mallvouchertemplate_points}</em>{$Think.lang.points_unit}</div>
  85. </div>
  86. <div class="range">
  87. <div>{$Think.lang.goodsclassname}</div>
  88. <div class="gc_name">{$v.mallvouchertemplate_gcname}</div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. </li>
  94. {/foreach}
  95. </ul>
  96. <div class="tc mt20 mb20">
  97. <div class="pagination">{$show_page|raw}</div>
  98. </div>
  99. {else /}
  100. <div class="no_results">{$Think.lang.home_voucher_list_null}</div>
  101. {/notempty}
  102. </div>
  103. </div>
  104. <script>
  105. $(function(){
  106. //代金券兑换功能
  107. $("[ds_type='exchangebtn']").on('click',function(){
  108. var data_str = $(this).attr('data-param');
  109. eval( "data_str = "+data_str);
  110. {if session('is_login') != '1'}
  111. login_dialog();
  112. {else}
  113. ajax_form('vexchange', '{$Think.lang.home_mallvoucher_exchangtitle}', "{:url('Pointmallvoucher/mallvoucherexchange')}?vid="+data_str.vid, 550);
  114. {/if}
  115. return false;
  116. });
  117. });
  118. </script>
  119. <script>
  120. $(function () {
  121. $("[ds_type='search_orderby']").click(function(){
  122. var data_str = $(this).attr('data-param');
  123. eval( "data_str = "+data_str);
  124. $("#orderby").val(data_str.orderval);
  125. searchvoucher();
  126. });
  127. $("[ds_type='search_cate']").click(function(){
  128. var data_str = $(this).attr('data-param');
  129. eval( "data_str = "+data_str);
  130. $("#gc_id").val(data_str.gc_id);
  131. searchvoucher();
  132. });
  133. });
  134. function searchvoucher(){
  135. var url = "{:url('Pointmallvoucher/index')}"+'?';
  136. var gc_id = $("#gc_id").val();
  137. if(gc_id){
  138. url += ('gc_id='+gc_id)+'&';
  139. }
  140. var orderby = $("#orderby").val();
  141. if(orderby){
  142. url += ('orderby='+orderby)+'&';
  143. }
  144. var price = $("#price").val();
  145. if(price){
  146. url += ('price='+price)+'&';
  147. }
  148. var points_min = $("#points_min").val();
  149. if(points_min){
  150. url += ('points_min='+points_min)+'&';
  151. }
  152. var points_max = $("#points_max").val();
  153. if(points_max){
  154. url += ('points_max='+points_max)+'&';
  155. }
  156. if($("#isable").prop("checked")){
  157. url += 'isable=1';
  158. }
  159. go(url);
  160. }
  161. </script>
  162. {/block}