events_invitation.html 3.0 KB

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