%%B3^B3D^B3D542DA%%events_cutscreen.html.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <?php /* Smarty version 2.6.17, created on 2018-04-23 10:04:21
  2. compiled from events_cutscreen.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. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  9. $this->_smarty_include(array('smarty_include_tpl_file' => "nav.html", 'smarty_include_vars' => array()));
  10. $this->_tpl_vars = $_smarty_tpl_vars;
  11. unset($_smarty_tpl_vars);
  12. ?>
  13. <link rel="stylesheet" type="text/css" href="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  14. /public/static/css/swiper.min.css" />
  15. <link rel="stylesheet" type="text/css" href="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  16. /public/static/css/swiper.animate.min.css" />
  17. <script src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  18. /public/static/js/swiper.jquery.min.js"></script>
  19. <script src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  20. /public/static/js/swiper.animate.min.js"></script>
  21. <style>
  22. .swiper-container {width:100%; position:absolute;}
  23. .page-screen {
  24. background-attachment: scroll;
  25. background-position: top center;
  26. background-repeat: no-repeat;
  27. background-size: 320px auto;
  28. }
  29. .background_image {
  30. display: block;
  31. overflow: hidden;
  32. width: 100%;
  33. z-index: 0;
  34. position: absolute;
  35. }
  36. .upper_image {
  37. position: absolute;
  38. }
  39. .button_image {
  40. position: absolute;
  41. }
  42. @-webkit-keyframes right_start {
  43. 0%,30% {opacity: 0;-webkit-transform: translate(10px, 0) rotate(-90deg);}
  44. 60% {opacity: 1;-webkit-transform: translate(0,0) rotate(-90deg);}
  45. 100% {opacity: 0;-webkit-transform: translate(-8px, 0) rotate(-90deg);}
  46. }
  47. @-moz-keyframes right_start {
  48. 0%,30% {opacity: 0;-moz-transform: translate(10px,0) rotate(-90deg);}
  49. 60% {opacity: 1;-moz-transform: translate(0,0) rotate(-90deg);}
  50. 100% {opacity: 0;-moz-transform: translate(-8px,0) rotate(-90deg);}
  51. }
  52. @keyframes right_start {
  53. 0%,30% {opacity: 0;transform: translate(10px,0) rotate(-90deg);}
  54. 60% {opacity: 1;transform: translate(0,0) rotate(-90deg);}
  55. 100% {opacity: 0;transform: translate(-8px,0) rotate(-90deg);}
  56. }
  57. @-webkit-keyframes botton_start {
  58. 0%,30% {opacity: 0;-webkit-transform: translate(0,10px);}
  59. 60% {opacity: 1;-webkit-transform: translate(0,0);}
  60. 100% {opacity: 0;-webkit-transform: translate(0,-8px);}
  61. }
  62. @-moz-keyframes botton_start {
  63. 0%,30% {opacity: 0;-moz-transform: translate(0,10px);}
  64. 60% {opacity: 1;-moz-transform: translate(0,0);}
  65. 100% {opacity: 0;-moz-transform: translate(0,-8px);}
  66. }
  67. @keyframes botton_start {
  68. 0%,30% {opacity: 0;transform: translate(0,10px);}
  69. 60% {opacity: 1;transform: translate(0,0);}
  70. 100% {opacity: 0;transform: translate(0,-8px);}
  71. }
  72. .bottom_arrow {
  73. width: 20px;
  74. height: 15px;
  75. position: absolute;
  76. z-index: 999;
  77. bottom: 10px;
  78. left: 50%;
  79. animation: botton_start 1.5s infinite ease-in-out;
  80. -webkit-animation: botton_start 1.5s infinite ease-in-out;
  81. -moz-animation: botton_start 1.5s infinite ease-in-out;
  82. }
  83. .right_arrow {
  84. width: 20px;
  85. height: 15px;
  86. position: absolute;
  87. z-index: 999;
  88. right: 10px;
  89. top: 50%;
  90. animation: right_start 1.5s infinite ease-in-out;
  91. -webkit-animation: right_start 1.5s infinite ease-in-out;
  92. -moz-animation: right_start 1.5s infinite ease-in-out;
  93. }
  94. .music {
  95. width: 30px;
  96. height: 30px;
  97. overflow: hidden;
  98. position: fixed;
  99. z-index: 999;
  100. background: url("<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  101. /public/static/img/music.png") no-repeat -30px 0px;
  102. background-size: 60px 30px;
  103. }
  104. .music.left {top:2%;left:3%;}
  105. .music.right {top:2%;right:3%;}
  106. .music.off {background-position: 0px 0px;}
  107. .mask {background-color:<?php echo $this->_tpl_vars['cutScreenInfo']['loading_bg_color']; ?>
  108. ;display: block;height: 100%;position: absolute;width: 100%;z-index: 200;}
  109. .loading{position:relative;text-align:center;top:40%; color:<?php echo $this->_tpl_vars['cutScreenInfo']['loading_text_color']; ?>
  110. ;}
  111. .loading i{font-size:30px;}
  112. .loading p{font-size: 12px;}
  113. .swiper-slide {overflow: hidden;}
  114. .ks-input {
  115. position: fixed;
  116. top: 20%;
  117. width: 100%;
  118. z-index: 990;
  119. display: none;
  120. }
  121. .ks-input .join_submit_box {
  122. background: #f2f2f4 none repeat scroll 0 0;
  123. margin: 0 10px;
  124. padding: 22px 10px 10px;
  125. }
  126. .input-mask {
  127. background: #000 none repeat scroll 0 0;
  128. display: block;
  129. height: 100%;
  130. left: 0;
  131. opacity: 0.5;
  132. position: fixed;
  133. top: 0;
  134. width: 100%;
  135. z-index: -1;
  136. }
  137. </style>
  138. <div class="mask">
  139. <div class="loading">
  140. <i class="fa fa-spinner fa-pulse"></i>
  141. <p><span>0</span>%</p>
  142. </div>
  143. </div>
  144. <div class="wrapper jsc-sidebar-content jsc-sidebar-pulled">
  145. <?php if ($this->_tpl_vars['cutScreenInfo']['music_url']): ?>
  146. <div class="music <?php if ($this->_tpl_vars['cutScreenInfo']['music_position'] == 1): ?>right<?php endif; ?>"></div>
  147. <?php endif; ?>
  148. <div class="swiper-container">
  149. <div class="swiper-wrapper">
  150. <?php $_from = $this->_tpl_vars['pageData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  151. foreach ($_from as $this->_tpl_vars['item']):
  152. ?>
  153. <div class="swiper-slide" style="<?php if ($this->_tpl_vars['item']['background_color']): ?>background-color:<?php echo $this->_tpl_vars['item']['background_color']; ?>
  154. <?php endif; ?>">
  155. <?php if ($this->_tpl_vars['item']['bgimage_url']): ?><img class="background_image" style="" src="<?php echo $this->_tpl_vars['item']['bgimage_url']; ?>
  156. " ><?php endif; ?>
  157. <?php $_from = $this->_tpl_vars['item']['layers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
  158. foreach ($_from as $this->_tpl_vars['layer']):
  159. ?>
  160. <?php if ($this->_tpl_vars['layer']['url']): ?>
  161. <?php if ($this->_tpl_vars['layer']['link']): ?>
  162. <a href="<?php echo $this->_tpl_vars['layer']['link']; ?>
  163. ">
  164. <?php endif; ?>
  165. <?php if ($this->_tpl_vars['layer']['input_btn']): ?>
  166. <a class="show_input_btn" href="javascript:;">
  167. <?php endif; ?>
  168. <img class="upper_image ani" style=
  169. "
  170. width:<?php echo $this->_tpl_vars['layer']['width']; ?>
  171. px;
  172. height:<?php echo $this->_tpl_vars['layer']['height']; ?>
  173. px;
  174. <?php echo $this->_tpl_vars['layer']['style']; ?>
  175. "
  176. <?php if ($this->_tpl_vars['layer']['action'] && $this->_tpl_vars['layer']['action'] != 'rest'): ?>
  177. swiper-animate-effect="<?php if ($this->_tpl_vars['layer']['action'] == 'up'): ?>fadeInUp<?php else: ?>fadeInRight<?php endif; ?>"
  178. swiper-animate-duration="0.3s"
  179. swiper-animate-delay="0.1s"
  180. <?php endif; ?>
  181. src="<?php echo $this->_tpl_vars['layer']['url']; ?>
  182. "
  183. >
  184. <?php if ($this->_tpl_vars['layer']['input_btn']): ?>
  185. </a>
  186. <?php endif; ?>
  187. <?php if ($this->_tpl_vars['layer']['link']): ?>
  188. </a>
  189. <?php endif; ?>
  190. <?php endif; ?>
  191. <?php if ($this->_tpl_vars['layer']['video_url']): ?>
  192. <iframe class="upper_image ani" width=<?php echo $this->_tpl_vars['layer']['video_width']; ?>
  193. height=<?php echo $this->_tpl_vars['layer']['video_height']; ?>
  194. src="<?php echo $this->_tpl_vars['layer']['video_url']; ?>
  195. "
  196. style="<?php echo $this->_tpl_vars['layer']['style']; ?>
  197. "
  198. <?php if ($this->_tpl_vars['layer']['action'] && $this->_tpl_vars['layer']['action'] != 'rest'): ?>
  199. swiper-animate-effect="<?php if ($this->_tpl_vars['layer']['action'] == 'up'): ?>fadeInUp<?php else: ?>fadeInRight<?php endif; ?>"
  200. swiper-animate-duration="0.3s"
  201. swiper-animate-delay="0.1s"
  202. <?php endif; ?>
  203. frameborder=0 allowfullscreen></iframe>
  204. <?php endif; ?>
  205. <?php endforeach; endif; unset($_from); ?>
  206. </div>
  207. <?php endforeach; endif; unset($_from); ?>
  208. </div>
  209. </div>
  210. <?php if ($this->_tpl_vars['cutScreenInfo']['cut_fx'] == 'fadeInUp'): ?>
  211. <img class="bottom_arrow" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  212. /public/static/img/arrow.png" >
  213. <?php endif; ?>
  214. <?php if ($this->_tpl_vars['cutScreenInfo']['cut_fx'] == 'fadeInRight'): ?>
  215. <img class="right_arrow" src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  216. /public/static/img/arrow.png" >
  217. <?php endif; ?>
  218. </div>
  219. <div class="ks-input">
  220. <div class="input-mask"></div>
  221. <div class="v_close_btn hide_input_btn" style="right:10px;"></div>
  222. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  223. $this->_smarty_include(array('smarty_include_tpl_file' => "event_forms_template.html", 'smarty_include_vars' => array()));
  224. $this->_tpl_vars = $_smarty_tpl_vars;
  225. unset($_smarty_tpl_vars);
  226. ?>
  227. </div>
  228. <!--公用提示背景遮罩层-->
  229. <div class="a_cover"></div>
  230. <div class="v_tips_box v_tips_box2" id="error_tips_box">
  231. <div class="v_close_btn" id="tips_close_btn"></div>
  232. <p class="tips_msg" id="error_msg">错误信息</p>
  233. </div>
  234. <!--活动结束提示+按钮-->
  235. <div class="v_tips_box v_tips_box2" id="try_tips_box">
  236. <div class="v_close_btn" id="tips_close_btn"></div>
  237. <p>提交成功!</p>
  238. <p><a href="javascript:;" class="v2_close_btn submit_btn_style">确认</a></p>
  239. </div>
  240. <script>
  241. KISSY.use('node, dom, io, gallery/xplayer/2.1.0/index', function (S, Node, DOM, IO, Xplayer) {
  242. S.log('image loading start');
  243. var $ = S.all, slide;
  244. //loading
  245. var waitLoadingImgs = <?php echo $this->_tpl_vars['waitLoadingImgs']; ?>
  246. ,
  247. hasLoadingTimes = 0, hasLoadingProgress = 0, loadNum = $(".mask p span");
  248. var runId, waitRunData = [];
  249. updateProgress(15, 100, 0);
  250. var avgTime = Math.round(70/waitLoadingImgs.length);
  251. for (var i = 0; i < waitLoadingImgs.length; i++) {
  252. var oi = new Image();
  253. oi.src = waitLoadingImgs[i];
  254. oi.onload = function () {
  255. ++hasLoadingTimes;
  256. S.log('image loading ok');
  257. updateProgress(avgTime, 100, 0);
  258. };
  259. }
  260. var ID = setInterval(function () {
  261. if (hasLoadingTimes == waitLoadingImgs.length) {
  262. clearInterval(ID);
  263. updateProgress(15, 1000, 1);
  264. S.log('image loading done');
  265. }
  266. }, 10);
  267. function updateProgress(num, time, isDone) {
  268. waitRunData.push(num+'-'+time+'-'+isDone);
  269. }
  270. runQueue();
  271. function runQueue() {
  272. if (runId > 0) clearInterval(runId);
  273. var time = 0, addnum = 0, tmpnum = 1;
  274. var rundata = waitRunData.shift();
  275. if (S.isUndefined(rundata)) {
  276. rundata = '';
  277. }
  278. rundata = rundata.split('-');
  279. addnum = rundata[0];
  280. time = rundata[1];
  281. isDone = rundata[2];
  282. var millisec = time/addnum;
  283. runId = setInterval(function () {
  284. if (tmpnum > addnum) {
  285. if (isDone == 1) {
  286. clearInterval(runId);
  287. loadNum.html(100);
  288. //
  289. jQuery(".mask").fadeOut();
  290. swiperInit();
  291. return false;
  292. }
  293. //S.log('runqueue');
  294. runQueue();
  295. return;
  296. }
  297. ++tmpnum;
  298. ++hasLoadingProgress;
  299. if (hasLoadingProgress > 100) hasLoadingProgress = 100;
  300. loadNum.html(hasLoadingProgress);
  301. }, millisec);
  302. }
  303. //20s
  304. setTimeout(function () {
  305. clearInterval(runId);
  306. loadNum.html(100);
  307. swiperInit();
  308. $(".mask").fadeOut();
  309. }, 15000);
  310. <?php if ($this->_tpl_vars['cutScreenInfo']['music_url']): ?>
  311. var XiamiPlay = new Xplayer({"autoplay": false});
  312. XiamiPlay.load({
  313. 'url' : '<?php echo $this->_tpl_vars['cutScreenInfo']['music_url']; ?>
  314. ',
  315. });
  316. XiamiPlay.play();
  317. $(".music").on('click', function () {
  318. if ($(this).hasClass('off')) {
  319. $(this).removeClass('off');
  320. XiamiPlay.play();
  321. } else {
  322. $(this).addClass('off');
  323. XiamiPlay.pause();
  324. }
  325. });
  326. XiamiPlay.on("ended", function(e) {
  327. XiamiPlay.play();
  328. });
  329. <?php endif; ?>
  330. var screenHeight = $(window).height();
  331. var headerHeight = $(".wrapper-header").height();
  332. $(".swiper-container").height(screenHeight - headerHeight);
  333. <?php if ($this->_tpl_vars['cutScreenInfo']['cut_fx'] == 'fadeInRight'): ?>
  334. var direction = 'horizontal';
  335. <?php else: ?>
  336. var direction = 'vertical';
  337. <?php endif; ?>
  338. var swiper_params = {
  339. direction : direction // vertical \ horizontal
  340. , speed: 300
  341. , onInit: function(swiper){
  342. swiperAnimateCache(swiper);
  343. swiperAnimate(swiper);
  344. }
  345. , onSlideChangeEnd: function(swiper){
  346. swiperAnimate(swiper);
  347. if (swiper.isEnd) {
  348. $('.bottom_arrow, right_arrow').hide();
  349. } else {
  350. $('.bottom_arrow, right_arrow').show();
  351. }
  352. }
  353. };
  354. var isSwiper = false;
  355. function swiperInit () {
  356. if (!isSwiper) {
  357. var swiper = new Swiper('.swiper-container', swiper_params);//start swiper
  358. isSwiper = true;
  359. slide = $(swiper.slides[swiper.activeIndex]);
  360. }
  361. }
  362. $(".bottom_arrow").width();
  363. function showErrorMsgBox(msg){
  364. $(".v_tips_box").fadeOut();
  365. $("#error_msg").html(msg);
  366. $("#error_tips_box").show();
  367. }
  368. $(".v_close_btn,.v2_close_btn").on('click', function(){
  369. $(".v_tips_box,.a_cover").hide();
  370. });
  371. IO.on("send",function(){
  372. showErrorMsg('<i class="fa fa-spinner fa-pulse"></i>');
  373. $('.a_cover').fadeIn();
  374. });
  375. $('#common_submit_btn', slide).on('click', function () {
  376. var formData = IO.serialize('#ff');
  377. IO.post('<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  378. /?c=EventsCutScreen&a=SubmitForm&events_id=<?php echo $this->_tpl_vars['cutScreenInfo']['id']; ?>
  379. '
  380. , formData
  381. , function (data) {
  382. if (data.ok) {
  383. showOkMsg();
  384. $(".ks-input").fadeOut(.3);
  385. } else {
  386. showErrorMsg(data.msg);
  387. }
  388. }
  389. , 'json'
  390. );
  391. return false;
  392. });
  393. $(".show_input_btn").on('click', function () {
  394. $(".ks-input").fadeIn(.3);
  395. });
  396. $(".hide_input_btn").on('click', function () {
  397. $(".ks-input").fadeOut(.3);
  398. });
  399. });
  400. function showOkMsg(){
  401. $('.a_cover').fadeIn(200);
  402. $('#try_tips_box').fadeIn(200);
  403. }
  404. function showErrorMsg(data_msg){
  405. $('#tips_close_btn').show();
  406. $('#error_msg').html(data_msg);
  407. $('#error_tips_box').fadeIn(200);
  408. $('.a_cover').fadeIn(200);
  409. }
  410. </script>
  411. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  412. $this->_smarty_include(array('smarty_include_tpl_file' => "bottom.html", 'smarty_include_vars' => array()));
  413. $this->_tpl_vars = $_smarty_tpl_vars;
  414. unset($_smarty_tpl_vars);
  415. ?>