pointprod_info.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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. <div class="dsp-container">
  5. <div class="dsp-detail">
  6. <div class="dsp-gift-picture">
  7. <a href="{$prodinfo.pgoods_image_max}">
  8. <img src="{$prodinfo.pgoods_image_max}">
  9. </a>
  10. </div>
  11. <div class="dsp-gift-summary">
  12. <div class="name">
  13. <h1>{$prodinfo.pgoods_name}</h1>
  14. </div>
  15. <div class="dsp-meta">
  16. <h2 class="meta-title">{$Think.lang.pointprod_pointsname}</h2>
  17. <dl class="clearfix">
  18. <dt>{$Think.lang.original_price_space|raw}</dt>
  19. <dd class="cost-price"><strong>{$Think.lang.currency}{$prodinfo.pgoods_price}</strong></dd>
  20. </dl>
  21. <dl class="clearfix">
  22. <dt>{$Think.lang.points_required}</dt>
  23. <dd class="points">
  24. <strong>{$prodinfo.pgoods_points}{$Think.lang.points_unit}</strong>
  25. {if $prodinfo.pgoods_limitmgrade}
  26. <span>{$prodinfo.pgoods_limitgradename}{$Think.lang.exclusive}</span>
  27. {/if}
  28. </dd>
  29. </dl>
  30. {if $prodinfo.pgoods_islimittime == 1}
  31. <dl class="clearfix">
  32. <dt>{$Think.lang.pointprod_info_goods_limittime}{$Think.lang.ds_colon}</dt>
  33. <dd>
  34. {:date('Y-m-d H:i:s',$prodinfo.pgoods_starttime)}
  35. {$Think.lang.pointprod_info_goods_limittime_to}
  36. {:date('Y-m-d H:i:s',$prodinfo.pgoods_endtime)}
  37. </dd>
  38. </dl>
  39. {if $prodinfo.ex_state == 'going'}
  40. <dl class="clearfix">
  41. <dt>&nbsp;</dt>
  42. <dd class="countdown">{$Think.lang.pointprod_info_goods_lasttime}&nbsp;&nbsp;
  43. <i id="dhpd">{$prodinfo.timediff.diff_day}</i> {$Think.lang.pointprod_info_goods_lasttime_day}
  44. <i id="dhph">{$prodinfo.timediff.diff_hour}</i> {$Think.lang.pointprod_info_goods_lasttime_hour}
  45. <i id="dhpm">{$prodinfo.timediff.diff_mins}</i> {$Think.lang.pointprod_info_goods_lasttime_mins}
  46. <i id="dhps">{$prodinfo.timediff.diff_secs}</i> {$Think.lang.pointprod_info_goods_lasttime_secs}
  47. </dd>
  48. </dl>
  49. {/if}
  50. {/if}
  51. </div>
  52. <div class="dsp-key">
  53. <dl>
  54. <dt>{$Think.lang.pointprod_info_goods_exchangenum}</dt>
  55. <dd class="dsp-figure-input">
  56. <input name="exnum" type="text" class="text w30" id="exnum" value='1' size="4"/>
  57. <span>{$Think.lang.pointprod_info_goods_lastnum}{$Think.lang.ds_colon}{$prodinfo.pgoods_storage}
  58. <input type="hidden" id="storagenum" value="{$prodinfo.pgoods_storage}"/>
  59. </span>
  60. </dd>
  61. </dl>
  62. {if $prodinfo.pgoods_islimit == '1'}
  63. <dl>
  64. <dt>{$Think.lang.limited_exchange}</dt>
  65. <dd>{$Think.lang.pointprod_info_goods_limitnum_tip1}{$prodinfo.pgoods_limitnum}{$Think.lang.pointprod_pointprod_unit}
  66. <input type="hidden" id="limitnum" value="{$prodinfo.pgoods_limitnum}"/>
  67. </dd>
  68. </dl>
  69. {else /}
  70. <input type="hidden" id="limitnum" value=""/>
  71. {/if}
  72. </dd>
  73. </dl>
  74. </div>
  75. <div class="dss-btn">
  76. {if $prodinfo.ex_state == 'willbe'}
  77. <a class="no-buynow">{$Think.lang.pointprod_willbe}</a>
  78. {elseif $prodinfo.ex_state == 'end'}
  79. <a class="no-buynow">{$Think.lang.pointprod_exchange_end}</a>
  80. {elseif session('is_login') != '1'}
  81. <a class="buynow" href="javascript:login_dialog();" style="cursor:pointer;"><i class="ico"></i>{$Think.lang.pointprod_exchange}</a>
  82. {else /}
  83. <a class="buynow" onclick="return add_to_cart();" style="cursor:pointer;"><i class="ico"></i>{$Think.lang.pointprod_exchange}</a>
  84. {/if}
  85. </div>
  86. </div>
  87. <div style=" position: absolute; z-index: 1; top: -1px; right: -1px;">
  88. <div class="dsp-sidebar">
  89. <div class="dsp-sidebar-container">
  90. <div class="title"><h3>{$Think.lang.hot_gifts}</h3><span></span></div>
  91. <div class="content">
  92. {notempty name="recommend_pointsprod"}
  93. <ul class="recommend">
  94. {foreach name="recommend_pointsprod" item="v"}
  95. <li>
  96. <div class="gift-pic">
  97. <a target="_blank" href="{:url('Pointprod/pinfo',['id'=>$v.pgoods_id])}" title="{$v.pgoods_name}">
  98. <img src="{$v.pgoods_image}" alt="{$v.pgoods_name}" />
  99. </a>
  100. </div>
  101. <div class="gift-name">
  102. <a href="{:url('Pointprod/pinfo',['id'=>$v.pgoods_id])}" target="_blank" tile="{$v.pgoods_name}">{$v.pgoods_name}</a>
  103. </div>
  104. </li>
  105. {/foreach}
  106. </ul>
  107. {else /}
  108. <div class="no_results">{$Think.lang.pointprod_list_null}</div>
  109. {/notempty}
  110. </div>
  111. <div class="track-more">
  112. <a href="javascript:void(0);" class="sprite-up"><i class="iconfont">&#xe688;</i></a>
  113. <a href="javascript:void(0);" class="sprite-down"><i class="iconfont">&#xe689;</i></a>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="dsp-goods-layout">
  120. <div class="dsp-info">
  121. <div class="title">
  122. <h4>{$Think.lang.mall_provides}</h4>
  123. </div>
  124. <div class="content">
  125. <dl>
  126. <dt>{$Think.lang.pointprod_info_goods_serial}{$Think.lang.ds_colon}</dt>
  127. <dd>{$prodinfo.pgoods_serial}</dd>
  128. </dl>
  129. <dl>
  130. <dt>{$Think.lang.add_time}:</dt>
  131. <dd>{:date('Y-m-d',$prodinfo.pgoods_addtime)}</dd>
  132. </dl>
  133. <dl>
  134. <dt>{$Think.lang.browsing_time}:</dt>
  135. <dd>{$prodinfo.pgoods_view}</dd>
  136. </dl>
  137. </div>
  138. <div class="title">
  139. <h4>{$Think.lang.exchange_record}</h4>
  140. </div>
  141. <ul class="dsp-exchangeNote">
  142. {notempty name="orderprod_list"}
  143. {foreach name="orderprod_list" item="v"}
  144. <li>
  145. <div class="user-avatar"><img src="{$v.member_avatar}" /></div>
  146. <div class="user-name">{:str_cut($v.point_buyername,4)}***</div>
  147. <div class="user-log">{$Think.lang.pointprod_info_goods_alreadyexchange}<strong>1</strong>{$Think.lang.piece}</div>
  148. </li>
  149. {/foreach}
  150. {/notempty}
  151. </ul>
  152. </div>
  153. <div class="dsp-goods-main">
  154. <div class="tabbar">
  155. <div class="dsp-goods-title-nav">
  156. <ul id="categorymenu">
  157. <li class="current">
  158. <a id="tabGoodsIntro" href="#content">{$Think.lang.pointprod_info_goods_description}</a>
  159. </li>
  160. </ul>
  161. </div>
  162. </div>
  163. <div class="dsp-goods-info-content">{:htmlspecialchars_decode($prodinfo.pgoods_body)}</div>
  164. </div>
  165. </div>
  166. </div>
  167. <script src="{$Think.PLUGINS_SITE_ROOT}/jquery.SuperSlide.2.1.1.js"></script>
  168. <script>
  169. jQuery(".dsp-sidebar-container").slide({mainCell:".content ul",prevCell:'.sprite-up',nextCell:'.sprite-down',autoPage:true,effect:"top",vis:3});
  170. </script>
  171. <script>
  172. function copy_url()
  173. {
  174. var txt = $("#shareurl").val();
  175. if(window.clipboardData)
  176. {
  177. // the IE-manier
  178. window.clipboardData.clearData();
  179. window.clipboardData.setData("Text", txt);
  180. layer.msg("{$Think.lang.pointprod_info_goods_urlcopy_succcess}");
  181. }
  182. else if(navigator.userAgent.indexOf("Opera") != -1)
  183. {
  184. window.location = txt;
  185. layer.msg("{$Think.lang.pointprod_info_goods_urlcopy_succcess}");
  186. }
  187. else if (window.netscape)
  188. {
  189. // dit is belangrijk maar staat nergens duidelijk vermeld:
  190. // you have to sign the code to enable this, or see notes below
  191. try {
  192. netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
  193. } catch (e) {
  194. layer.msg("{$Think.lang.pointprod_info_goods_urlcopy_fail}!\n{$Think.lang.pointprod_info_goods_urlcopy_fail1}\'about:config\'{$Think.lang.pointprod_info_goods_urlcopy_fail2}\n{$Think.lang.pointprod_info_goods_urlcopy_fail3}\'signed.applets.codebase_principal_support\'{$Think.lang.pointprod_info_goods_urlcopy_fail4}\'true\'");
  195. return false;
  196. }
  197. // maak een interface naar het clipboard
  198. var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
  199. if (!clip){return;}
  200. // alert(clip);
  201. // maak een transferable
  202. var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
  203. if (!trans){return;}
  204. // specificeer wat voor soort data we op willen halen; text in dit geval
  205. trans.addDataFlavor('text/unicode');
  206. // om de data uit de transferable te halen hebben we 2 nieuwe objecten
  207. // nodig om het in op te slaan
  208. var str = new Object();
  209. var len = new Object();
  210. str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
  211. var copytext = txt;
  212. str.data = copytext;
  213. trans.setTransferData("text/unicode",str,copytext.length*2);
  214. var clipid = Components.interfaces.nsIClipboard;
  215. if (!clip){return false;}
  216. clip.setData(trans,null,clipid.kGlobalClipboard);
  217. layer.msg("{$Think.lang.pointprod_info_goods_urlcopy_succcess}");
  218. }
  219. }
  220. function GetRTime2() //积分礼品兑换倒计时
  221. {
  222. var rtimer=null;
  223. var startTime = new Date();
  224. var EndTime = {$prodinfo.pgoods_endtime}*1000;
  225. var NowTime = new Date();
  226. var nMS =EndTime - NowTime.getTime();
  227. if(nMS>0)
  228. {
  229. var nD=Math.floor(nMS/(1000*60*60*24));
  230. var nH=Math.floor(nMS/(1000*60*60)) % 24;
  231. var nM=Math.floor(nMS/(1000*60)) % 60;
  232. var nS=Math.floor(nMS/1000) % 60;
  233. document.getElementById("dhpd").innerHTML=pendingzero(nD);
  234. document.getElementById("dhph").innerHTML=pendingzero(nH);
  235. document.getElementById("dhpm").innerHTML=pendingzero(nM);
  236. document.getElementById("dhps").innerHTML=pendingzero(nS);
  237. if(nS==0&&nH==0&&nM==0)
  238. {
  239. // document.getElementById("returntime").style.display='none';
  240. clearTimeout(rtimer2);
  241. window.location.href=window.location.href;
  242. return;
  243. }
  244. rtimer2=setTimeout("GetRTime2()",1000);
  245. }
  246. }
  247. GetRTime2();
  248. function pendingzero(str)
  249. {
  250. var result=str+"";
  251. if(str<10)
  252. {
  253. result="0"+str;
  254. }
  255. return result;
  256. }
  257. //加入购物车
  258. function add_to_cart()
  259. {
  260. var storagenum = parseInt($("#storagenum").val());//库存数量
  261. var limitnum = parseInt($("#limitnum").val());//限制兑换数量
  262. var quantity = parseInt($("#exnum").val());//兑换数量
  263. //验证数量是否合法
  264. var checkresult = true;
  265. var msg = '';
  266. if(!quantity >=1 ){//如果兑换数量小于1则重新设置兑换数量为1
  267. quantity = 1;
  268. }
  269. if(limitnum > 0 && quantity > limitnum){
  270. checkresult = false;
  271. msg = '{$Think.lang.pointprod_info_goods_exnummaxlimit_error}';
  272. }
  273. if(storagenum > 0 && quantity > storagenum){
  274. checkresult = false;
  275. msg = '{$Think.lang.pointprod_info_goods_exnummaxlast_error}';
  276. }
  277. if(checkresult == false){
  278. alert(msg);
  279. return false;
  280. }else{
  281. $.getJSON(HOMESITEURL+'/Pointcart/add.html?pgid={$prodinfo.pgoods_id}&quantity='+quantity, function(result){
  282. if(result.done){
  283. window.location.href = '{:url('Pointcart/index')}';
  284. } else {
  285. if(result.url){
  286. layer.confirm(result.msg, {
  287. btn: ['{$Think.lang.ds_ok}', '{$Think.lang.ds_cancel}'],
  288. }, function () {
  289. window.location.href = result.url;
  290. });
  291. } else {
  292. layer.alert(result.msg);
  293. }
  294. }
  295. });
  296. }
  297. }
  298. </script>
  299. {/block}