events_infos.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <style>
  2. .button {
  3. cursor: pointer;
  4. }
  5. </style>
  6. <{if $type == 'share'}>
  7. <link rel="stylesheet" type="text/css" href="<{$web_cfg.cdn}>/haili/css/detail.css" />
  8. <section class="profile">
  9. <section class="avatar">
  10. <img src="<{$userSourceInfo.headimgurl}>">
  11. <span><{$userSourceInfo.nickname}></span>
  12. </section>
  13. <dl class="card">
  14. <dd>参与活动 <{$info.events_name}>,邀请您来加油!</dd>
  15. <dt><img src="<{$info.img_url}>"></dt>
  16. </dl>
  17. <section class="button-wrapper">
  18. <{if $uid == $source_user}>
  19. <a class="button yaoqing" node-type="share">邀请好友助力!</a>
  20. <{else}>
  21. <a class="button" href="javascript:;" onclick="help();">为好友助力!</a>
  22. <a class="button" href="<{$info.thisUrl}>">我也要参加!</a>
  23. <{/if}>
  24. </section>
  25. <section class="friends">
  26. <p>已助力好友<span><{$helpDataTotal}></span>人</p>
  27. <{if $helpData}>
  28. <ul>
  29. <{foreach from=$helpData item=v}>
  30. <li><img src="<{$v.headimgurl}>"></li>
  31. <{/foreach}>
  32. </ul>
  33. <{/if}>
  34. </section>
  35. </section>
  36. <section class="applycont">
  37. <{if $info.operationt_tips}>
  38. <h2><{$info.operationt_tips}></h2>
  39. <{/if}>
  40. <section class="summary">
  41. <{$info.events_rules}>
  42. </section>
  43. </section>
  44. <{if $focusData}>
  45. <section class="recommend">
  46. <ul>
  47. <{foreach from=$focusData item=v}>
  48. <li><a href="<{$v.link}>"><img src="<{$v.pic}>"><span><{$v.name}></span></a></li>
  49. <{/foreach}>
  50. </ul>
  51. </section>
  52. <{/if}>
  53. <{if $ad}>
  54. <section class="ad">
  55. <h2><span>广告</span></h2>
  56. <{$ad}>
  57. </section>
  58. <{/if}>
  59. <script>
  60. share_url = '<{$info.thisUrl}>/share?events_id=<{$info.id}>&help_id=<{$help_id}>&help_session=<{$help_session}>&source_user=<{$source_user}>';
  61. function help()
  62. {
  63. var url = '<{$web_cfg.domain}>/?c=UserHelp&a=apply';
  64. $.getJSON(url, {events_id:'<{$info.id}>', help_id:'<{$help_id}>', help_session:'<{$help_session}>', source_user:'<{$source_user}>'}, function(t)
  65. {
  66. if (t.ok) {
  67. toast('助力成功!');
  68. } else {
  69. toast(t.msg, 1);
  70. }
  71. });
  72. }
  73. </script>
  74. <script type="text/javascript" src="<{$web_cfg.cdn}>/haili/js/detail.js"></script>
  75. <{elseif $type == 'prize'}>
  76. <{if $userEventsData}>
  77. <section id="tab2" class="tabcont" style="display:block;">
  78. <section class="userlist">
  79. <ul id="lazyLoad">
  80. <{foreach from=$userEventsData item=v}>
  81. <li><img src="<{$v.user.headimgurl}>"><span><{$v.user.mobile}> 的用户 <{$v.user.cdate}> 获得 <{$v.user.events}> <{$v.user.ext}>。</span></li>
  82. <{/foreach}>
  83. </ul>
  84. </section>
  85. </section>
  86. <div class="clear"></div>
  87. <div class="loading">
  88. <img
  89. id="loadPage"
  90. src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  91. data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  92. data-request-url="<{$info.thisUrl}>/prize?ajax=ajax"
  93. data-page="2"
  94. data-totals="<{$userEventsDataTotals}>"
  95. style="width:0px;"
  96. />
  97. <div class="loader-inner ball-pulse">
  98. <div></div><div></div><div></div><div></div><div></div><div></div>
  99. </div>
  100. </div>
  101. <script>
  102. KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
  103. var lock = false;
  104. new Datalazyload({
  105. load: function(el){
  106. if (lock) return false;
  107. lock = true;
  108. var requesrUrl = $(el).data('request-url');
  109. var page = Number($(el).data('page'));
  110. var totals = Number($(el).data('totals'));
  111. if (!requesrUrl) {
  112. return false;
  113. }
  114. if (page > totals) {
  115. $('.loading').hide();
  116. return false;
  117. }
  118. IO.get(
  119. requesrUrl
  120. , {page: page}
  121. , function (data) {
  122. if (data.ok) {
  123. var next_page = page + 1;
  124. $('#loadPage').data('page', next_page);
  125. $("#lazyLoad").append(data.msg);
  126. lock = false;
  127. $('.loading').hide();
  128. new Datalazyload();
  129. if (next_page > totals) {
  130. $('.up_icon').hide();
  131. }
  132. }
  133. }
  134. , 'json'
  135. );
  136. }
  137. });
  138. });
  139. //有产品列表时添加整体body背景色
  140. $(body).addClass("bg_white");
  141. </script>
  142. <{/if}>
  143. <{elseif $type == 'feedback'}>
  144. <{if $fdData}>
  145. <section id="tab3" class="tabcont" style="display:block;">
  146. <section class="commentlist">
  147. <ul id="lazyLoad">
  148. <{foreach from=$fdData item=v}>
  149. <li>
  150. <img src="<{$v.user.headimgurl}>">
  151. <div class="dt">
  152. <span><{$v.user.mobile}> 的用户 <{$v.user.cdate}> 评价了 <{$v.user.events}>活动:</span>
  153. <{if $v.pic[0]}>
  154. <div class="imgs">
  155. <{foreach from=$v.pic item=v1}>
  156. <img src="<{$v1}>">
  157. <{/foreach}>
  158. </div>
  159. <{/if}>
  160. <p><{$v.content}></p>
  161. </div>
  162. </li>
  163. <{/foreach}>
  164. </ul>
  165. </section>
  166. </section>
  167. <div class="clear"></div>
  168. <div class="loading">
  169. <img
  170. id="loadPage"
  171. src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  172. data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  173. data-request-url="<{$info.thisUrl}>/feedback?ajax=ajax"
  174. data-page="2"
  175. data-totals="<{$totals}>"
  176. style="width:0px;"
  177. />
  178. <div class="loader-inner ball-pulse">
  179. <div></div><div></div><div></div><div></div><div></div><div></div>
  180. </div>
  181. </div>
  182. <script>
  183. KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
  184. var lock = false;
  185. new Datalazyload({
  186. load: function(el){
  187. if (lock) return false;
  188. lock = true;
  189. var requesrUrl = $(el).data('request-url');
  190. var page = Number($(el).data('page'));
  191. var totals = Number($(el).data('totals'));
  192. if (!requesrUrl) {
  193. return false;
  194. }
  195. if (page > totals) {
  196. $('.loading').hide();
  197. return false;
  198. }
  199. IO.get(
  200. requesrUrl
  201. , {page: page}
  202. , function (data) {
  203. if (data.ok) {
  204. var next_page = page + 1;
  205. $('#loadPage').data('page', next_page);
  206. $("#lazyLoad").append(data.msg);
  207. lock = false;
  208. //new Datalazyload();
  209. if (next_page > totals) {
  210. $('.up_icon').hide();
  211. }
  212. }
  213. }
  214. , 'json'
  215. );
  216. }
  217. });
  218. });
  219. //有产品列表时添加整体body背景色
  220. $(body).addClass("bg_white");
  221. </script>
  222. <{/if}>
  223. <{else}>
  224. <section id="tab1" class="tabcont" style="display:block;">
  225. <section class="cardcont">
  226. <dl class="card">
  227. <dd><span class="time"><em class="icon-time"></em>剩余<{$info.rday}>天</span><span>参与<{$info.user_total}>人</span></dd>
  228. </dl>
  229. <section class="article">
  230. <{$info.events_tips}>
  231. </section>
  232. <{if $info.type != 1}>
  233. <{if $info.share_button == 2 || $info.buy_button == 2}>
  234. <section class="button-wrapper">
  235. <{if $info.share_button == 2 && $info.type == 4}>
  236. <a class="button share_buttons" node-type="share" href="<{$info.thisUrl}>/share"><{$info.share_button_tips}></a>
  237. <{elseif $info.share_button == 2}>
  238. <a class="button share_button" node-type="share"><{$info.share_button_tips}></a>
  239. <{/if}>
  240. <{if $info.buy_button == 2}>
  241. <a class="button buy_button" data-weixin="<{$info.buy_button_link}>" data-app="<{$info.buy_button_app}>" href="<{$info.buy_button_link}>"><{$info.buy_button_tips}></a>
  242. <{/if}>
  243. </section>
  244. <{/if}>
  245. <{/if}>
  246. </section>
  247. <section class="applycont">
  248. <{if $info.type == 4 || $info.type == 6 || $info.type == 7}>
  249. <{if $info.events_hd_tips}>
  250. <h2><{$info.events_hd_tips}></h2>
  251. <{/if}>
  252. <{include file="events_forms_template_new.html"}>
  253. <{elseif $info.type == 1}>
  254. <{include file="events_turntable_content.html"}>
  255. <{if $info.share_button == 2 || $info.buy_button == 2}>
  256. <section class="button-wrapper">
  257. <{if $info.share_button == 2 && $info.type == 4}>
  258. <a class="button share_buttons" node-type="share" href="<{$info.thisUrl}>/share"><{$info.share_button_tips}></a>
  259. <{elseif $info.share_button == 2}>
  260. <a class="button share_button" node-type="share"><{$info.share_button_tips}></a>
  261. <{/if}>
  262. <{if $info.buy_button == 2}>
  263. <a class="button buy_button" data-weixin="<{$info.buy_button_link}>" data-app="<{$info.buy_button_app}>" href="<{$info.buy_button_link}>"><{$info.buy_button_tips}></a>
  264. <{/if}>
  265. </section>
  266. <{/if}>
  267. <{elseif $info.type == 11}>
  268. <{include file="events_survey_content.html"}>
  269. <{elseif $info.type == 5}>
  270. <{include file="events_vote_content.html"}>
  271. <{/if}>
  272. <{if $info.operationt_tips}>
  273. <h2><{$info.operationt_tips}></h2>
  274. <{/if}>
  275. <section class="summary">
  276. <{$info.events_rules}>
  277. </section>
  278. </section>
  279. <{if $focusData}>
  280. <section class="recommend">
  281. <ul>
  282. <{foreach from=$focusData item=v}>
  283. <li><a href="<{$v.link}>"><img src="<{$v.pic}>" height="128"><span><{$v.name}></span></a></li>
  284. <{/foreach}>
  285. </ul>
  286. </section>
  287. <{/if}>
  288. <{if $ad}>
  289. <section class="ad">
  290. <h2><span>广告</span></h2>
  291. <{$ad}>
  292. </section>
  293. <{/if}>
  294. </section>
  295. <{/if}>
  296. <section class="layer" <{if $info.end == 2 && $info.login != 2}>style="display:block"<{/if}>>
  297. <section class="loginbox">
  298. <h3>活动已结束!</h3>
  299. <p>感谢您的关注,期待您参与我们的其他活动</p>
  300. <section class="button-wrapper">
  301. <a class="button border" href="<{$listUrl}>">找找其他福利</a>
  302. <a class="button" href="<{$giftsUrl}>">查看我的奖品</a>
  303. </section>
  304. </section>
  305. </section>
  306. <section class="layer" id="loginbox" style="display:none;">
  307. <section class="loginbox">
  308. <h3>您还没有登录</h3>
  309. <p>请登录后再参与福利活动</p>
  310. <section class="button-wrapper">
  311. <a class="button border" href="<{$listUrl}>">找找其他福利</a>
  312. <a class="button" href="<{$loginUrl}>">马上登录</a>
  313. </section>
  314. </section>
  315. </section>
  316. <{if $info.login == 2}>
  317. <script>
  318. $(function()
  319. {
  320. loadLogin();
  321. })
  322. </script>
  323. <{/if}>