%%A0^A01^A01AF397%%events_try.html.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php /* Smarty version 2.6.17, created on 2018-05-29 14:28:29
  2. compiled from events_try.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. <div class="v_tips_box v_tips_box2" id="error_tips_box">
  27. <div class="v_close_btn"></div>
  28. <p class="tips_msg" id="error_msg">错误信息</p>
  29. </div>
  30. <!--活动结束提示+按钮-->
  31. <div class="v_tips_box v_tips_box2" id="try_tips_box">
  32. <div class="v_close_btn"></div>
  33. <p>您的申请提交成功!</p>
  34. <p><a href="javascript:;" class="v2_close_btn submit_btn_style">确认</a></p>
  35. </div>
  36. <script>
  37. var seconds = 2000;
  38. function clearCover(){
  39. $('.a_cover').fadeOut(200);
  40. }
  41. function showOkMsg(){
  42. $('.a_cover').fadeIn(200);
  43. $('#try_tips_box').fadeIn(200);
  44. }
  45. var goUrl = '';
  46. function go_page(){
  47. location.href = goUrl;
  48. }
  49. function showErrorMsg(data_msg){
  50. $('.v_close_btn').show();
  51. $('#error_msg').html(data_msg);
  52. $('#error_tips_box').fadeIn(200);
  53. $('.a_cover').fadeIn(200);
  54. }
  55. function showErrorMsgGoPage(data_msg){
  56. $('.v_close_btn').show();
  57. $('#error_msg').html(data_msg);
  58. $('#error_tips_box').fadeIn();
  59. $('.a_cover').fadeIn();
  60. setInterval("go_page();",seconds+100);
  61. }
  62. KISSY.use('node, io', function (S, Node, IO) {
  63. var $ = S.all;
  64. //视频自适应
  65. var screenWidth = $(window).width();
  66. var baseWidth = 510;
  67. var video_scale = screenWidth / baseWidth;
  68. $(".video_iframe").each(function () {
  69. var new_width = $(this).width() * video_scale;
  70. $(this).width(new_width - 20);
  71. var new_height = $(this).height() * video_scale;
  72. $(this).height(new_height - 20);
  73. });
  74. function showErrorMsgBox(msg){
  75. $(".v_tips_box").fadeOut();
  76. $("#error_msg").html(msg);
  77. $("#error_tips_box").show();
  78. }
  79. $(".v_close_btn,.v2_close_btn").on('click', function(){
  80. $(".v_tips_box,.a_cover").hide();
  81. });
  82. /*
  83. IO.on("send",function(){
  84. //$(".a_cover").css("opacity", 0);
  85. showErrorMsg('<i class="fa fa-spinner fa-pulse"></i>');
  86. $('.a_cover').fadeIn();
  87. });
  88. IO.on("complete",function(){
  89. //$("#error_tips_box").fadeOut();
  90. });
  91. */
  92. $('#common_submit_btn').on('click', function () {
  93. var formData = IO.serialize('#ff');
  94. IO.post('<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  95. /?c=EventsTry&a=apply&events_id=<?php echo $this->_tpl_vars['tryInfo']['id']; ?>
  96. '
  97. , formData
  98. , function (data) {
  99. if (data.ok) {
  100. //showOkMsg();
  101. toast('提交成功,请等待管理员审核');
  102. } else {
  103. if(data.msg.url){
  104. loadLogin();
  105. return;
  106. goUrl = '<?php echo $this->_tpl_vars['loginUrl']; ?>
  107. ';
  108. showErrorMsgGoPage('本活动需登录后才可以参与');
  109. return;
  110. }
  111. toast(data.msg, 1);
  112. }
  113. }
  114. , 'json'
  115. );
  116. return false;
  117. });
  118. });
  119. </script>
  120. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  121. $this->_smarty_include(array('smarty_include_tpl_file' => "bottom.html", 'smarty_include_vars' => array()));
  122. $this->_tpl_vars = $_smarty_tpl_vars;
  123. unset($_smarty_tpl_vars);
  124. ?>