events_invitation.html 3.8 KB

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