events_infos.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  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="<{$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('助力成功!', false);
  68. } else {
  69. toast(t.msg, 1);
  70. }
  71. });
  72. }
  73. ;(function($){
  74. $('body').on('click','[node-type="share"]',function(){
  75. if(navigator.userAgent.toLocaleLowerCase().indexOf('micromessenger') >-1){
  76. $('body').append(`<section class="layer" id="sharelayer" style="display:block;">
  77. <section class="shareguide">
  78. <img src="http://circlecdn.mrhi.cn/haili/images/8eaa4804.shareguide.png">
  79. </section>
  80. </section>`)
  81. $('#sharelayer').on('click',function(){
  82. $(this).remove();
  83. })
  84. }
  85. })
  86. })(Zepto)
  87. </script>
  88. <script type="text/javascript" src="<{$web_cfg.cdn}>/haili/js/detail.js"></script>
  89. <{elseif $type == 'prize'}>
  90. <{if $userEventsData}>
  91. <section id="tab2" class="tabcont" style="display:block;">
  92. <section class="userlist">
  93. <ul id="lazyLoad">
  94. <{foreach from=$userEventsData item=v}>
  95. <li><img src="<{$web_cfg.cdn}>/public/static/img/bg_alpha.png" data-ks-lazyload="<{$v.user.headimgurl}>" width="80" height="80"><span>用户 <{$v.user.mobile}><{$v.user.cdate}> 获得 <{$v.user.events}> <{$v.user.ext}></span></li>
  96. <{/foreach}>
  97. </ul>
  98. </section>
  99. </section>
  100. <div class="clear"></div>
  101. <div class="loading">
  102. <img
  103. id="loadPage"
  104. src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  105. data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  106. data-request-url="<{$info.thisUrl}>/prize?ajax=ajax"
  107. data-page="2"
  108. data-totals="<{$userEventsDataTotals}>"
  109. style="width:0px;"
  110. />
  111. <div class="loader-inner ball-pulse">
  112. <div></div><div></div><div></div><div></div><div></div><div></div>
  113. </div>
  114. </div>
  115. <script>
  116. KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
  117. var lock = false;
  118. new Datalazyload({
  119. load: function(el){
  120. if (lock) return false;
  121. lock = true;
  122. var requesrUrl = $(el).data('request-url');
  123. var page = Number($(el).data('page'));
  124. var totals = Number($(el).data('totals'));
  125. if (!requesrUrl) {
  126. return false;
  127. }
  128. if (page > totals) {
  129. $('.loading').hide();
  130. return false;
  131. }
  132. IO.get(
  133. requesrUrl
  134. , {page: page}
  135. , function (data) {
  136. if (data.ok) {
  137. var next_page = page + 1;
  138. $('#loadPage').data('page', next_page);
  139. $("#lazyLoad").append(data.msg);
  140. lock = false;
  141. $('.loading').hide();
  142. new Datalazyload();
  143. if (next_page > totals) {
  144. $('.up_icon').hide();
  145. }
  146. }
  147. }
  148. , 'json'
  149. );
  150. }
  151. });
  152. });
  153. //有产品列表时添加整体body背景色
  154. $(body).addClass("bg_white");
  155. </script>
  156. <{/if}>
  157. <{elseif $type == 'help'}>
  158. <{if $helpData}>
  159. <section id="tab4" class="tabcont" style="display:block;">
  160. <section class="zhulilist">
  161. <ul id="lazyLoad">
  162. <{foreach from=$helpData item=v}>
  163. <li>
  164. <div>
  165. <{if $userData[$v.uid].headimgurl}>
  166. <img src="<{$userData[$v.uid].headimgurl}>" />
  167. <{else}>
  168. <img src="http://news.mydrivers.com/Img/20110518/04481549.png" />
  169. <{/if}><span><{if $userData[$v.uid].nickname}><{$userData[$v.uid].nickname}><{else}>游客<{/if}></span>
  170. </div>
  171. <div><span>助力值<{$v.num}></span></div>
  172. </li>
  173. <{/foreach}>
  174. </ul>
  175. </section>
  176. </section>
  177. <div class="clear"></div>
  178. <div class="loading">
  179. <img
  180. id="loadPage"
  181. src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  182. data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  183. data-request-url="<{$info.thisUrl}>/help?ajax=ajax"
  184. data-page="2"
  185. data-totals="<{$helpDataTotals}>"
  186. style="width:0px;"
  187. />
  188. <div class="loader-inner ball-pulse">
  189. <div></div><div></div><div></div><div></div><div></div><div></div>
  190. </div>
  191. </div>
  192. <script>
  193. KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
  194. var lock = false;
  195. new Datalazyload({
  196. load: function(el){
  197. if (lock) return false;
  198. lock = true;
  199. var requesrUrl = $(el).data('request-url');
  200. var page = Number($(el).data('page'));
  201. var totals = Number($(el).data('totals'));
  202. if (!requesrUrl) {
  203. return false;
  204. }
  205. if (page > totals) {
  206. $('.loading').hide();
  207. return false;
  208. }
  209. IO.get(
  210. requesrUrl
  211. , {page: page}
  212. , function (data) {
  213. if (data.ok) {
  214. var next_page = page + 1;
  215. $('#loadPage').data('page', next_page);
  216. $("#lazyLoad").append(data.msg);
  217. lock = false;
  218. //new Datalazyload();
  219. if (next_page > totals) {
  220. $('.up_icon').hide();
  221. }
  222. }
  223. }
  224. , 'json'
  225. );
  226. }
  227. });
  228. });
  229. //有产品列表时添加整体body背景色
  230. $(body).addClass("bg_white");
  231. </script>
  232. <{/if}>
  233. <{elseif $type == 'feedback'}>
  234. <{if $fdData}>
  235. <section id="tab3" class="tabcont" style="display:block;">
  236. <section class="commentlist">
  237. <ul id="lazyLoad">
  238. <{foreach from=$fdData item=v}>
  239. <li>
  240. <img src="<{$v.user.headimgurl}>">
  241. <div class="dt">
  242. <span><{$v.user.mobile}> 的用户 <{$v.user.cdate}> 评价了 <{$v.user.events}>活动:</span>
  243. <{if $v.pic[0]}>
  244. <div class="imgs">
  245. <{foreach from=$v.pic item=v1}>
  246. <img src="<{$v1}>">
  247. <{/foreach}>
  248. </div>
  249. <{/if}>
  250. <p><{$v.content}></p>
  251. </div>
  252. </li>
  253. <{/foreach}>
  254. </ul>
  255. </section>
  256. </section>
  257. <div class="clear"></div>
  258. <div class="loading">
  259. <img
  260. id="loadPage"
  261. src="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  262. data-ks-lazyload="<{$web_cfg.cdn}>/public/static/img/loading.gif"
  263. data-request-url="<{$info.thisUrl}>/feedback?ajax=ajax"
  264. data-page="2"
  265. data-totals="<{$fdDataTotals}>"
  266. style="width:0px;"
  267. />
  268. <div class="loader-inner ball-pulse">
  269. <div></div><div></div><div></div><div></div><div></div><div></div>
  270. </div>
  271. </div>
  272. <script>
  273. KISSY.use('node, io, gallery/datalazyload/2.0/index', function (S, Node, IO, Datalazyload) {
  274. var lock = false;
  275. new Datalazyload({
  276. load: function(el){
  277. if (lock) return false;
  278. lock = true;
  279. var requesrUrl = $(el).data('request-url');
  280. var page = Number($(el).data('page'));
  281. var totals = Number($(el).data('totals'));
  282. if (!requesrUrl) {
  283. return false;
  284. }
  285. if (page > totals) {
  286. $('.loading').hide();
  287. return false;
  288. }
  289. IO.get(
  290. requesrUrl
  291. , {page: page}
  292. , function (data) {
  293. if (data.ok) {
  294. var next_page = page + 1;
  295. $('#loadPage').data('page', next_page);
  296. $("#lazyLoad").append(data.msg);
  297. lock = false;
  298. //new Datalazyload();
  299. if (next_page > totals) {
  300. $('.up_icon').hide();
  301. }
  302. }
  303. }
  304. , 'json'
  305. );
  306. }
  307. });
  308. });
  309. //有产品列表时添加整体body背景色
  310. $(body).addClass("bg_white");
  311. </script>
  312. <{/if}>
  313. <{else}>
  314. <section id="tab1" class="tabcont" style="display:block;">
  315. <section class="cardcont">
  316. <dl class="card">
  317. <dd><span class="time"><em class="icon-time"></em>剩余<{$info.rday}></span><span>参与<{$info.user_total}></span></dd>
  318. </dl>
  319. <section class="article">
  320. <{$info.events_tips}>
  321. </section>
  322. <{if $info.type == 1}>
  323. <!--抽奖loading begin-->
  324. <div class="luck_loading" id="luck_loading">
  325. <div class="luck_load_icon">
  326. <div class="loading_img"></div>
  327. </div>
  328. </div>
  329. <!--抽奖loading end-->
  330. <!--抽奖结果 begin-->
  331. <div class="luck_result" id="luck_result">
  332. <div><img src="<{$web_cfg.cdn}>/public/static/img/error_icon.png"></div>
  333. <div>未中奖,感谢参与</div>
  334. </div>
  335. <!--抽奖结果 end-->
  336. <section class="button-wrapper luck_show" id="luck_show">
  337. <a class="button" id="award_btn">开始抽奖</a>
  338. </section>
  339. <{/if}>
  340. <{if $info.type != 1}>
  341. <{if $info.share_button == 2 || $info.buy_button == 2}>
  342. <section class="button-wrapper">
  343. <{if $info.share_button == 2 && $info.type == 4}>
  344. <a class="button share_buttons" node-type="share" href="<{$info.thisUrl}>/share"><{$info.share_button_tips}></a>
  345. <{elseif $info.share_button == 2}>
  346. <a class="button share_button" node-type="share"><{$info.share_button_tips}></a>
  347. <{/if}>
  348. <{if $info.buy_button == 2}>
  349. <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>
  350. <{/if}>
  351. </section>
  352. <{/if}>
  353. <{/if}>
  354. </section>
  355. <section class="applycont">
  356. <{if $info.type == 4 || $info.type == 6 || $info.type == 7}>
  357. <{if $info.events_hd_tips}>
  358. <h2><{$info.events_hd_tips}></h2>
  359. <{/if}>
  360. <{include file="events_forms_template_new.html"}>
  361. <{elseif $info.type == 1}>
  362. <{include file="events_turntable_content.html"}>
  363. <{elseif $info.type == 11}>
  364. <{include file="events_survey_content.html"}>
  365. <{elseif $info.type == 5}>
  366. <{include file="events_vote_content.html"}>
  367. <{/if}>
  368. </section>
  369. <section class="applycont">
  370. <{if $info.operationt_tips}>
  371. <h2><{$info.operationt_tips}></h2>
  372. <{/if}>
  373. <section class="summary">
  374. <{$info.events_rules}>
  375. </section>
  376. </section>
  377. <{if $focusData}>
  378. <section class="recommend">
  379. <ul>
  380. <{foreach from=$focusData item=v}>
  381. <li><a href="<{$v.link}>"><img src="<{$v.pic}>"></a></li>
  382. <{/foreach}>
  383. </ul>
  384. </section>
  385. <{/if}>
  386. <{if $ad}>
  387. <section class="ad">
  388. <h2><span>广告</span></h2>
  389. <{$ad}>
  390. </section>
  391. <{/if}>
  392. </section>
  393. <{/if}>
  394. <{if $info.type == 4 && $info.yaoqing}>
  395. <section class="layer" id="layerbox" style="display:none;">
  396. <section class="loginbox">
  397. <h3>申请成功!</h3>
  398. <p><{$info.yaoqing}></p>
  399. <section class="button-wrapper">
  400. <a class="button" href="<{$info.thisUrl}>/share"><{$info.share_button_tips}></a>
  401. </section>
  402. </section>
  403. </section>
  404. <{/if}>
  405. <section class="layer" <{if $info.end == 2 && $info.login != 2 && !$userData && $info.type != 4}>style="display:block"<{/if}>>
  406. <section class="loginbox">
  407. <h3>活动已结束!</h3>
  408. <p>感谢您的关注,期待您参与我们的其他活动</p>
  409. <section class="button-wrapper">
  410. <a class="button border" href="<{$listUrl}>">找找其他福利</a>
  411. <a class="button" href="<{$giftsUrl}>">查看我的奖品</a>
  412. </section>
  413. </section>
  414. </section>
  415. <section class="layer" id="loginbox" style="display:none;">
  416. <section class="loginbox">
  417. <h3>您还没有登录</h3>
  418. <p>请登录后再参与福利活动</p>
  419. <section class="button-wrapper">
  420. <a class="button border" href="<{$listUrl}>">找找其他福利</a>
  421. <{if $applogin && $applogin == 1}>
  422. <a class="button" href="javascript:;" onclick="istoken('<{$loginUrl}>', 1);" style="cursor:pointer;">马上登录</a>
  423. <{else}>
  424. <a class="button" id="loginyes" href="<{$loginUrl}>">马上登录</a>
  425. <{/if}>
  426. </section>
  427. </section>
  428. </section>
  429. <{if $info.login == 2}>
  430. <script>
  431. $(function()
  432. {
  433. loadLogin();
  434. })
  435. </script>
  436. <{/if}>