events_invitation.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <{include file="header.html"}>
  2. <!--公用标题居中显示-->
  3. <{include file="common_header.html"}>
  4. <!---->
  5. <div class="wrapper clear">
  6. <div class="article_title center"><{$info.events_name}></div>
  7. <!--公用活动说明样式-->
  8. <div class="article_content">
  9. <{$info.events_tips}>
  10. </div>
  11. <div class="v_box_w clear">
  12. <{if !$eventsStatus}>
  13. <{if $info.events_hd_tips}>
  14. <div class="h3_title"><{$info.events_hd_tips}></div>
  15. <{/if}>
  16. <{include file="event_forms_template.html"}>
  17. <{else}>
  18. <!--公用活动结束提示 begin-->
  19. <div class="v_end_com_box">
  20. <div class="v_end_txt_com center">活动已结束!</div>
  21. <div class="center"><a href="<{$listUrl}>" class="submit_btn_style">参与更多特权活动</a></div>
  22. </div>
  23. <{/if}>
  24. <{if $info.share_button == 2}>
  25. <{include file="share_button.html"}>
  26. <{/if}>
  27. <{if $info.operationt_tips}>
  28. <div class="h3_title"><{$info.operationt_tips}></div>
  29. <{/if}>
  30. <!--公用活动规则样式-->
  31. <div class="activity_des">
  32. <{$info.events_rules}>
  33. </div>
  34. <div class="clear"></div>
  35. </div>
  36. </div>
  37. <!--公用提示背景遮罩层-->
  38. <div class="a_cover"></div>
  39. <div class="v_tips_box v_tips_box2" id="error_tips_box">
  40. <div class="v_close_btn" id="tips_close_btn"></div>
  41. <p class="tips_msg" id="error_msg">错误信息</p>
  42. </div>
  43. <!--公用提示样式二 begin-->
  44. <!--<div class="v_tips_box2" style="display:none">
  45. <p class="tips_img"><img src="<{$codeInfo.code_img_url}>"></p>
  46. <p class="tips_txt_show">恭喜您获得<br><{$codeInfo.code_name}></p>
  47. <p class="go_tips_txt">请到"我的奖品"中查看</p>
  48. <p class="go_tips_btn">
  49. <a href="<{$giftsUrl}>" class="submit_btn_style">查看奖品</a>
  50. </p>
  51. </div>-->
  52. <!--公用提示样式二 end-->
  53. <script>
  54. var seconds = 2000;
  55. function showNewTipsBox(msg){
  56. $('.a_cover').fadeOut(200);
  57. $(".v_tips_box").fadeOut(200);
  58. $(".tips_msg").html(msg);
  59. $(".v_tips_box").fadeIn(200);
  60. $('.a_cover').fadeIn(200);
  61. if(goUrl){
  62. setInterval("go_page();",seconds+100);
  63. }
  64. }
  65. $("#tips_close_btn").on('click', function(){
  66. $(".v_tips_box,.a_cover").hide();
  67. });
  68. var goUrl = '';
  69. function go_page(){
  70. location.href = goUrl;
  71. }
  72. KISSY.use('node, io', function (S, Node, IO) {
  73. //视频自适应
  74. var screenWidth = $(window).width();
  75. var baseWidth = 510;
  76. var video_scale = screenWidth / baseWidth;
  77. $(".video_iframe").each(function () {
  78. var new_width = $(this).width() * video_scale;
  79. $(this).width(new_width - 20);
  80. var new_height = $(this).height() * video_scale;
  81. $(this).height(new_height - 20);
  82. });
  83. IO.on("send",function(){
  84. //$(".a_cover").css("opacity", 0);
  85. showTipsBox('<i class="fa fa-spinner fa-pulse"></i>', true);
  86. });
  87. IO.on("complete",function(){
  88. //$(".v_tips_box").hide();
  89. });
  90. $('#common_submit_btn').on('click', function () {
  91. goUrl = '';
  92. var formData = IO.serialize('#ff');
  93. IO.post('<{$web_cfg.domain}>/?c=EventsInvitation&a=sub&events_id=<{$info.id}>'
  94. , formData
  95. , function (data) {
  96. if (data.ok) {
  97. var formsId = data.msg;
  98. location.href = "<{$web_cfg.domain}>/?c=EventsInvitation&a=Qrcode&events_id=<{$info.id}>&formsId="+formsId;
  99. } else {
  100. if(data.msg.url){
  101. goUrl = '<{$loginUrl}>';
  102. showTipsBox('本活需登录后才可以参与');
  103. return false;
  104. }
  105. showTipsBox(data.msg);
  106. }
  107. }
  108. , 'json'
  109. );
  110. return false;
  111. });
  112. // 提示
  113. function showTipsBox(msg, isSend){
  114. $(".tips_msg").html(msg);
  115. if (isSend) {
  116. $("#tips_close_btn").hide();
  117. $("#error_tips_box").fadeIn();
  118. } else {
  119. $("#tips_close_btn").show();
  120. $("#error_tips_box").delay(2000).fadeOut();
  121. }
  122. }
  123. });
  124. </script>
  125. <{include file="bottom.html"}>