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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php /* Smarty version 2.6.17, created on 2018-05-29 14:27:24
  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. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  15. $this->_smarty_include(array('smarty_include_tpl_file' => "events_top.html", 'smarty_include_vars' => array()));
  16. $this->_tpl_vars = $_smarty_tpl_vars;
  17. unset($_smarty_tpl_vars);
  18. ?>
  19. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  20. $this->_smarty_include(array('smarty_include_tpl_file' => "events_infos.html", 'smarty_include_vars' => array()));
  21. $this->_tpl_vars = $_smarty_tpl_vars;
  22. unset($_smarty_tpl_vars);
  23. ?>
  24. <!--公用提示背景遮罩层-->
  25. <div class="a_cover"></div>
  26. <!--公用提示样式一 begin-->
  27. <div class="v_tips_box" id="msg_tips_box">
  28. <div class="v_close_btn"></div>
  29. <p class="tips_msg"></p>
  30. </div>
  31. <!--公用提示样式一 end-->
  32. <!--公用提示样式二 begin-->
  33. <div class="v_tips_box v_tips_box2">
  34. <div class="v_close_btn"></div>
  35. <p class="tips_img"><img src="<?php echo $this->_tpl_vars['codeInfo']['code_img_url']; ?>
  36. "></p>
  37. <p class="tips_txt_show">恭喜您获得<br><?php echo $this->_tpl_vars['codeInfo']['code_name']; ?>
  38. </p>
  39. <p class="go_tips_txt">券:<span>请到"我的奖品"中查看</span></p>
  40. <p class="go_tips_btn center">
  41. <a href="<?php echo $this->_tpl_vars['giftsUrl']; ?>
  42. " class="submit_btn_style">查看详情</a>
  43. </p>
  44. </div>
  45. <!--公用提示样式二 end-->
  46. <script>
  47. var seconds = 2000;
  48. //刷新页面
  49. function reload_page (){
  50. window.location.reload();
  51. }
  52. // 跳转页面
  53. var goUrl = '';
  54. function go_page(){
  55. location.href = goUrl;
  56. }
  57. $(".v_close_btn").on('click', function(){
  58. $(".v_tips_box,.a_cover").hide();
  59. });
  60. KISSY.use('node, io', function (S, Node, IO) {
  61. function showMsg($msg) {
  62. $('.tips_msg').html($msg);
  63. $('#msg_tips_box, .a_cover').fadeIn().delay(2000).fadeOut();
  64. }
  65. function showLoading() {
  66. $('.tips_msg').html('<i class="fa fa-spinner fa-pulse"></i>');
  67. $('#msg_tips_box, .a_cover').fadeIn();
  68. }
  69. $('#common_submit_btn').on('click', function () {
  70. IO.on("send",function(){
  71. //showLoading();
  72. });
  73. IO.on("complete",function(){
  74. //$("#v_tips_box").hide();
  75. });
  76. var formData = IO.serialize('#ff');
  77. IO.post('<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  78. /?c=EventsCode&a=apply&events_id=<?php echo $this->_tpl_vars['codeInfo']['id']; ?>
  79. '
  80. , formData
  81. , function (data) {
  82. if (data.ok) {
  83. S.log(data.msg);
  84. $("#msg_tips_box").hide();
  85. $(".go_tips_txt span").html(data.msg.codeData.data);
  86. $(".v_tips_box2").fadeIn();
  87. } else {
  88. if(data.msg.url){
  89. loadLogin();
  90. return;
  91. $(".tips_msg").html('本活动需登录后才可以参与');
  92. $('#msg_tips_box').fadeIn();
  93. goUrl = '<?php echo $this->_tpl_vars['loginUrl']; ?>
  94. ';
  95. setInterval("go_page();",seconds);
  96. return ;
  97. }
  98. //showMsg(data.msg);
  99. toast(data.msg, 1);
  100. return ;
  101. }
  102. }
  103. , 'json'
  104. );
  105. return false;
  106. });
  107. });
  108. </script>
  109. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  110. $this->_smarty_include(array('smarty_include_tpl_file' => "bottom.html", 'smarty_include_vars' => array()));
  111. $this->_tpl_vars = $_smarty_tpl_vars;
  112. unset($_smarty_tpl_vars);
  113. ?>