events_code.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <{include file="header.html"}>
  2. <!--公用标题居中显示-->
  3. <{include file="common_header.html"}>
  4. <div class="wrapper clear">
  5. <div class="article_title center"><{$codeInfo.events_name}></div>
  6. <!--公用活动说明样式-->
  7. <div class="article_content">
  8. <{$codeInfo.events_tips}>
  9. </div>
  10. <div class="v_box_w clear">
  11. <{if !$eventsStatus}>
  12. <{if $codeInfo.events_hd_tips}>
  13. <div class="h3_title"><{$codeInfo.events_hd_tips}></div>
  14. <{/if}>
  15. <{include file="event_forms_template.html"}>
  16. <{else}>
  17. <!--公用活动结束提示 begin-->
  18. <div class="v_end_com_box">
  19. <div class="v_end_txt_com center">活动已结束!</div>
  20. <div class="center"><a href="<{$listUrl}>" class="submit_btn_style">参与更多特权活动</a></div>
  21. </div>
  22. <{/if}>
  23. <{if $codeInfo.share_button == 2}>
  24. <{include file="share_button.html"}>
  25. <{/if}>
  26. <{if $codeInfo.operationt_tips}>
  27. <div class="h3_title"><span><{$codeInfo.operationt_tips}></span></div>
  28. <{/if}>
  29. <!--公用活动规则样式-->
  30. <div class="activity_des">
  31. <{$codeInfo.events_rules}>
  32. </div>
  33. <div class="clear"></div>
  34. </div>
  35. </div>
  36. <!--公用提示背景遮罩层-->
  37. <div class="a_cover"></div>
  38. <!--公用提示样式一 begin-->
  39. <div class="v_tips_box" id="msg_tips_box">
  40. <div class="v_close_btn"></div>
  41. <p class="tips_msg"></p>
  42. </div>
  43. <!--公用提示样式一 end-->
  44. <!--公用提示样式二 begin-->
  45. <div class="v_tips_box v_tips_box2">
  46. <div class="v_close_btn"></div>
  47. <p class="tips_img"><img src="<{$codeInfo.code_img_url}>"></p>
  48. <p class="tips_txt_show">恭喜您获得<br><{$codeInfo.code_name}></p>
  49. <p class="go_tips_txt">券:<span>请到"我的奖品"中查看</span></p>
  50. <p class="go_tips_btn center">
  51. <a href="<{$giftsUrl}>" class="submit_btn_style">查看详情</a>
  52. </p>
  53. </div>
  54. <!--公用提示样式二 end-->
  55. <script>
  56. var seconds = 2000;
  57. //刷新页面
  58. function reload_page (){
  59. window.location.reload();
  60. }
  61. // 跳转页面
  62. var goUrl = '';
  63. function go_page(){
  64. location.href = goUrl;
  65. }
  66. $(".v_close_btn").on('click', function(){
  67. $(".v_tips_box,.a_cover").hide();
  68. });
  69. KISSY.use('node, io', function (S, Node, IO) {
  70. function showMsg($msg) {
  71. $('.tips_msg').html($msg);
  72. $('#msg_tips_box, .a_cover').fadeIn().delay(2000).fadeOut();
  73. }
  74. function showLoading() {
  75. $('.tips_msg').html('<i class="fa fa-spinner fa-pulse"></i>');
  76. $('#msg_tips_box, .a_cover').fadeIn();
  77. }
  78. $('#common_submit_btn').on('click', function () {
  79. IO.on("send",function(){
  80. showLoading();
  81. });
  82. IO.on("complete",function(){
  83. //$("#v_tips_box").hide();
  84. });
  85. var formData = IO.serialize('#ff');
  86. IO.post('<{$web_cfg.domain}>/?c=EventsCode&a=apply&events_id=<{$codeInfo.id}>'
  87. , formData
  88. , function (data) {
  89. if (data.ok) {
  90. S.log(data.msg);
  91. $("#msg_tips_box").hide();
  92. $(".go_tips_txt span").html(data.msg.codeData.data);
  93. $(".v_tips_box2").fadeIn();
  94. } else {
  95. if(data.msg.url){
  96. $(".tips_msg").html('本活需登录后才可以参与');
  97. $('#msg_tips_box').fadeIn();
  98. goUrl = '<{$loginUrl}>';
  99. setInterval("go_page();",seconds);
  100. return ;
  101. }
  102. showMsg(data.msg);
  103. return ;
  104. }
  105. }
  106. , 'json'
  107. );
  108. return false;
  109. });
  110. });
  111. </script>
  112. <{include file="bottom.html"}>