events_infos.html 11 KB

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