%%73^73D^73D43E79%%events_code.html.php 5.1 KB

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