%%9F^9F5^9F50A076%%events_turntable.html.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?php /* Smarty version 2.6.17, created on 2018-05-29 11:54:42
  2. compiled from events_turntable.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. <!--公用标题居中显示-->
  14. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  15. $this->_smarty_include(array('smarty_include_tpl_file' => "common_header.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_top.html", 'smarty_include_vars' => array()));
  21. $this->_tpl_vars = $_smarty_tpl_vars;
  22. unset($_smarty_tpl_vars);
  23. ?>
  24. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  25. $this->_smarty_include(array('smarty_include_tpl_file' => "events_infos.html", 'smarty_include_vars' => array()));
  26. $this->_tpl_vars = $_smarty_tpl_vars;
  27. unset($_smarty_tpl_vars);
  28. ?>
  29. <!--遮罩层-->
  30. <div class="a_cover"></div>
  31. <!--====================提示层样式5种,分别选择使用 begin===========================-->
  32. <!--通用文字提示层-->
  33. <div class="v_tips_box" id="vtips_1">
  34. <div class="v_close_btn"></div>
  35. <p>{{message}}</p>
  36. </div>
  37. <!--通用文字提示层+按钮-->
  38. <div class="v_tips_box v_tips_box2" id="vtips_2">
  39. <div class="v_close_btn"></div>
  40. <p>{{message}}</p>
  41. <p><a href="<?php echo $this->_tpl_vars['listUrl']; ?>
  42. " class="submit_btn_style">返回列表</a></p>
  43. </div>
  44. <!--活动结束提示+按钮-->
  45. <div class="v_tips_box v_tips_box2" id="vtips_3">
  46. <div class="v_close_btn"></div>
  47. <p>活动已结束!</p>
  48. <p><a href="<?php echo $this->_tpl_vars['listUrl']; ?>
  49. " class="submit_btn_style">其它活动</a></p>
  50. </div>
  51. <!--领取奖品提示层+按钮-->
  52. <div class="v_tips_box v_tips_box3" id="vtips_4">
  53. <div class="v_close_btn close_btn_href" url="<?php echo $this->_tpl_vars['giftsUrl']; ?>
  54. "></div>
  55. <div class="pro_list_box pro_list_box2 pro_list_box3">
  56. <dl>
  57. <dt>
  58. <img src="<?php echo $this->_tpl_vars['web_cfg']['cdn']; ?>
  59. /public/static/img/item_img.jpg">
  60. <p class="img_cover" style="background-image:url({{img_url}});"></p>
  61. </dt>
  62. <dd>
  63. <p class="pro_name">{{prize_name}}</p>
  64. </dd>
  65. </dl>
  66. </div>
  67. <p class="v_gray">请点击领取奖品,并填写配送地址</p>
  68. <p><a class="submit_btn_style" href="<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  69. /?c=Express&lottery_data_id={{lottery_data_id}}">领取奖品</a></p>
  70. </div>
  71. <!--查看奖品提示层+按钮-->
  72. <div class="v_tips_box v_tips_box3" id="vtips_5">
  73. <div class="v_close_btn close_btn_href" url="<?php echo $this->_tpl_vars['giftsUrl']; ?>
  74. "></div>
  75. <div class="pro_list_box tips_list_box pro_list_box3">
  76. <dl>
  77. <dt><img src="{{img_url}}"></dt>
  78. <dd>
  79. <p class="pro_name">{{prize_name}}</p>
  80. <p class="pro_num">{{virtual_data}}</p>
  81. </dd>
  82. </dl>
  83. </div>
  84. <p><a class="submit_btn_style" href="<?php echo $this->_tpl_vars['giftsUrl']; ?>
  85. ">查看奖品</a></p>
  86. </div>
  87. <!--====================提示层样式5种,分别选择使用 end===========================-->
  88. <!-- 显示 -->
  89. <div class="v_tips_box v_tips_box3" id="ks-tips"></div>
  90. <script>
  91. var goUrl = '';
  92. function go_page(){
  93. location.href = goUrl;
  94. }
  95. function showErrorMsg(data_msg){
  96. $('.v_close_btn').show();
  97. $('#error_msg').html(data_msg);
  98. $('#error_tips_box').fadeIn(200);
  99. $('.a_cover').fadeIn(200);
  100. }
  101. function showErrorMsgGoPage(data_msg){
  102. $('.v_close_btn').show();
  103. $('#error_msg').html(data_msg);
  104. $('#error_tips_box').fadeIn();
  105. $('.a_cover').fadeIn();
  106. setInterval("go_page();",seconds+100);
  107. }
  108. $("#award_btn").on('click', function(){
  109. var time = 2000;//设置抽奖loading时间
  110. $("#luck_show").hide();
  111. $("#luck_loading").show()/*.delay(time).fadeOut(0)*/;
  112. //$(".loading_img").css({height:"0px"}).animate({height:"70px"},time);
  113. });
  114. //通用弹出提示层
  115. function v_tips_show(){
  116. $(".v_tips_box").fadeIn(200);
  117. $(".a_cover").fadeIn(200);
  118. }
  119. //点击关闭提示层---通用
  120. $(".v_close_btn").live('click', function() {
  121. $(".v_tips_box").fadeOut(.2);
  122. $(".a_cover").fadeOut(.2);
  123. });
  124. // 点击关闭按钮
  125. $(".close_btn_href").live('click', function() {
  126. var url = $(this).attr('url');
  127. location.href = url;
  128. });
  129. KISSY.use('node, io, xtemplate, anim', function (S, Node, IO, XTemplate, Anim) {
  130. var $ = S.all;
  131. //视频自适应
  132. var screenWidth = $(window).width();
  133. var baseWidth = 510;
  134. var video_scale = screenWidth / baseWidth;
  135. $(".video_iframe").each(function () {
  136. var new_width = $(this).width() * video_scale;
  137. $(this).width(new_width - 20);
  138. var new_height = $(this).height() * video_scale;
  139. $(this).height(new_height - 20);
  140. });
  141. var drawResult = {};
  142. var drawAnim = new Anim(".loading_img", {'height':'70px'}, {
  143. duration: 2,
  144. complete: function () {
  145. var id = setInterval(function () {
  146. if (!S.isUndefined(drawResult.ok)) {
  147. run_result_anim(drawResult);
  148. clearInterval(id);
  149. }
  150. }, 100);
  151. }
  152. });
  153. //点击抽奖按钮切换抽奖效果
  154. $("#award_btn").on('click', function () {
  155. drawAnim.run();
  156. new IO({
  157. type: "get"
  158. , url: '<?php echo $this->_tpl_vars['web_cfg']['domain']; ?>
  159. /?c=EventsTurntable&a=Rotation'
  160. , data: {events_id: '<?php echo $this->_tpl_vars['turntableData']['events']['id']; ?>
  161. '}
  162. , success: function (data) {
  163. if (data.ok) {
  164. drawResult = data;
  165. return false;
  166. } else {
  167. if(data.msg.url){
  168. loadLogin();
  169. //goUrl = '<?php echo $this->_tpl_vars['loginUrl']; ?>
  170. ';
  171. //showErrorMsgGoPage('本活动需登录后才可以参与');
  172. return;
  173. } else {
  174. $("#luck_loading").hide();
  175. $("#luck_result").show();
  176. }
  177. }
  178. }
  179. , error: function (NULL, textStatus) {
  180. alert("请求服务器失败,原因:"+textStatus);
  181. }
  182. , dataType: "json"
  183. });
  184. });
  185. function run_result_anim(data) {
  186. if (data.ok) { //ok
  187. if(data.msg == 'NoPrize'){
  188. $("#luck_loading").hide();
  189. $("#luck_result").show();
  190. } else {
  191. if(data.msg.express == 1){//领奖
  192. var tpl = $("#vtips_4").html();
  193. } else {//查看奖品
  194. var tpl = $("#vtips_5").html();
  195. }
  196. var render = new XTemplate(tpl).render(data.msg);
  197. $("#ks-tips").html(render).fadeIn(.2);
  198. $(".a_cover").fadeIn(.2);
  199. }
  200. } else {
  201. if(data.msg == 'NoPrize'){
  202. $("#luck_loading").hide();
  203. $("#luck_result").show();
  204. } else {
  205. var tpl = $("#vtips_2").html();
  206. var render = new XTemplate(tpl).render({'message':data.msg});
  207. $("#ks-tips").html(render).fadeIn(.2);
  208. $(".a_cover").fadeIn(.2);
  209. $(".v_close_btn").on('click', function() {
  210. $(".v_tips_box").hide();
  211. $(".a_cover").hide();
  212. });
  213. }
  214. }
  215. }
  216. });
  217. //有产品列表时添加整体body背景色
  218. $(body).addClass("bg_white");
  219. </script>
  220. <?php $_smarty_tpl_vars = $this->_tpl_vars;
  221. $this->_smarty_include(array('smarty_include_tpl_file' => "bottom.html", 'smarty_include_vars' => array()));
  222. $this->_tpl_vars = $_smarty_tpl_vars;
  223. unset($_smarty_tpl_vars);
  224. ?>